This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Running applet by clicking a hyperlink

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need to run an applet by clicking a hyperlink.The following is the piece of code which i tried.It opens a new window but the applet does not run.

function openAppletWindow() {
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="applettohtml.html" CODE="applettohtml.class"</APPLET>');
}
</script>
<p><a href="javascript penAppletWindow()">Click here to start
Applet</a>
</p>

Arul has suggested me on this before.I am new to java and javascript.I dunno whether this is too simple.But i am not able to figure out what is going on...
Thanks.
Srikanth Narra
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The above works on a button click. In case of an hyperlink :
First, have an html (called first.html) like this:
<html>
<p><a href="applettohtml.html">Click here to start
Applet</a>
</p>
Next,in applettohtml.html have the code like this:
<html>
<applet code = "applettohtml.class" width = 100 height = 100>
</applet>
</html>
Now, run first.html and click the link to run the applet.
Remember to place first.html,applettohtml.html,applettohtml.class in the same directory.
Try it out and mail me back.
 
srikanth narra
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arul,
I did it but it is still saying that class not found when the html is run in the browser.I appreciate your willingness to get back to me.
Thanks
Sri Narra.
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic