• 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

jsp - java plugin - applet.

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
My jsp successfully loaded applet using java plugin when I used normal code as below:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "300" HEIGHT = "100" >
<PARAM NAME="code" VALUE="appletclassname.class">
<PARAM NAME="codebase" VALUE="/path/">
<PARAM NAME="archive" VALUE="appletjar.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
Now I am trying to call a method in the applet from onClick of a button in the jsp. I get "Object does not support this property or method" error.
Can someone enlighten me the mistake and provide a solution.
Thanks.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot use JavaScript in a JSP to Java methods, be they in the JSP or an embedded applet, or anywhere else for that matter.
Jason Menard
 
arul narayan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have successfully worked out a solution.
On the Click of a button in my JSP, I call a javascript function which does:
win=window.open("with usual parameters");
and I dynamically load the plugin with all the parms as follows:
win.document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "300" HEIGHT = "100" >
<PARAM NAME="code" VALUE="appletclassname.class">
<PARAM NAME="codebase" VALUE="/path/">
<PARAM NAME="archive" VALUE="appletjar.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3"></OBJECT>');
This also solves my original requirement to load the plugin only on a button click and also to call a particular method in the applet after the button click.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic