[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Launching java applet from a JS function



Hi,
I want to launch an applet when the user clicks on a button, i found 
that solution although not elegant to do it.
The problem is that the Applet don't launch (i don't see the result) 
but, btw the second instruction is working (self.close() ).
Why is this doesn't working, or, is there another way to do that ?
TIA
Seb
PS : This is my HTML code :
<HTML>
 <HEAD>
     <SCRIPT language="javascript">
    function mail()
    {
    document.write("<APPLET CODE=\"yes.class\" WIDTH=1
    HEIGHT=1></APPLET>")
    self.close() 
    }
 </SCRIPT>
 </HEAD>
       <BODY>
   <form>
      <input type="button" value="mail" onclick="mail()">
      <input type="button" value="close" onclick="self.close();return
      true">
   </form>
  </BODY>
</HTML>