Results 1 to 2 of 2
  1. #1
    rasen58 is offline Member
    Join Date
    Oct 2012
    Rep Power

    Default Interaction with javascript

    Im using JSObject to call a function in my html file, but its not working. Can you tell me why?
    Java Code:
    public class birthday extends JApplet implements ActionListener
    public void actionPerformed(ActionEvent evt) {
    if(evt.getSource() == song1)
    				JSObject win = JSObject.getWindow(this);"playSong", null);
    html file
    XML Code:
    <!DOCTYPE html>
    <script type="text/javascript">
    	function playSound()
    <applet code="birthday.class" width= 100% height=700 MAYSCRIPT> </applet>
    <audio src="New Divide.wav" id="sound" preload="auto"></audio>

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Interaction with javascript

    Maybe because playSong isn't playSound?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. want help about ArrayList and interaction
    By chmo in forum New To Java
    Replies: 2
    Last Post: 11-03-2010, 02:45 PM
  2. GUI interaction
    By Glyph in forum New To Java
    Replies: 6
    Last Post: 10-19-2010, 08:43 PM
  3. Java interaction
    By satimis in forum New To Java
    Replies: 4
    Last Post: 06-30-2010, 06:14 PM
  4. program interaction possible?
    By Pierced1 in forum Advanced Java
    Replies: 3
    Last Post: 02-19-2009, 01:54 AM
  5. Object Interaction
    By Jinxes in forum New To Java
    Replies: 1
    Last Post: 12-03-2007, 01:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts