• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling applets function from javascript

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Grow your own food... or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic