title: Calling Javascript functions from a Java Applet
body: <p>I have a Java Applet in a HTML page.
  I need to have the applet call a certain Javascript function to notify the HTML page of certain events.</p>
  
  <p>The way I call the JavaScript function currently is:</p>
  
  <pre><code>getAppletContext().showDocument(new URL("javascript:window.notifyEvent("+msisdn+")"));
  </code></pre>
  
  <p>I define the actual function within the HTML code but when the applet actually calls it I get 
  the <code>Uncaught ReferenceError: notifyEvent is not defined</code> error.</p>
  
  <p>Where do I need to define the javascript function for the applet to be able to call it?</p>
  
  <p>Thanks!</p>