• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

calling applets function from javascript

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,

How can I call an applets function from javascript.The applet is inside an object tag.
hare is the code that i wrote in my html page
<OBJECT "classid="clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA" width="100%" height="100%" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#Version=1,4,2,0">; <NOEMBED><XMP>
<applet name="appletname" code="abc.def.class" codebase="." archive="xx.jar" width="100%" height="100%" >
</applet>
</XMP>

</NOEMBED></EMBED>
</OBJECT>

*****
I tried the code
document.appletname.appletfunction() in javascript
but It is not working
please help.
Thanks in advance.
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shahabas
You should use ID attribute of the OBJECT tag to invoke methods on the applet.
I should warn you that applet's method calling in Netscape/Mozilla browsers using EMBED tag instead of OBJECt will not work.
Thanks
Maulin
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where you able to successfully do this? I am trying to do the same thing, I am using the ID on the OBJECT tag, I'm not worried about Netscape and it is not working.

Thanks!
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic