title: Check for presence of Java function in applet from javascript in IE9
body: <p>Hello stackoverflow community,</p>
  
  <p>I have some code that works on virtually every browser except for .... (Wait for it).... IE9 (and possibly other versions of IE?).</p>
  
  <p>So, I've added an applet to the page, everything goes well, but I want to check to see if the applet is loaded, so to do that, I've been polling to see if the functions in the applet exist.</p>
  
  <p>For example, let's say I have this method in my java applet:</p>
  
  <pre><code>public int dummy( int a ) {
    return a + 1;
  }
  </code></pre>
  
  <p>So in my javascript, I poll to see if the function exists like this (using jquery, where #applet is the id of the applet tag):</p>
  
  <pre><code>var japp = $("#applet").get(0);
  if( japp &amp;&amp; japp.dummy ) {
    alert( japp.dummy(1) );
  }
  </code></pre>
  
  <p>You'd notice that this works at least in Chrome and Firefox, but not IE9.</p>
  
  <p>In IE9, regardless of the method being accessible, <code>japp.dummy</code> always returns <code>undefined</code></p>
  
  <p>Does anyone know a good IE9 workaround?</p>
  
  <p>Thanks,
  -Oz</p>