Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running an applet by clicking a Button on HTML page

 
srikanth narra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one of you tell me how to start an applet running by clicking a hyperlink or a button on a HTML page? I think this is possible.I will be glad if any one can give a small piece of code which does this.
Thank You.
 
arul narayan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try calling a javascript function on "onClick" event of the button.
Inside the function do as follows:
top.frameName.document.write('<APPLET WIDTH=100
HEIGHT=100
NAME="appletname"
CODE="appletname.class"
</APPLET>');
Here frameName indicates the frame where you want the applet to run.
You can also run the applet on a new window as follows:
Inside the function:
var win=window.open("","","location=0,menubar=0,resizable=0,toolbar=0,status=0,height=150,width=500");
win.document.writeln('<APPLET WIDTH=100
HEIGHT=100
NAME="appletname"
CODE="appletname.class"
</APPLET>');
Hope this solves your purpose.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic