Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Applets and the fly likes Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet" Watch "Applet" New topic


vamsi br

Joined: Jun 28, 2000
Posts: 1
I want to call an applet methods from an HTML page.Basically i have an html page which contains two frames(Upper frame and lower frame).In the lower frame an applet is located i want to refer the applet from the first name how can i do that.How do i call the methods of an applet.Please let me know on this.Thanks in advance.
vis pree

Joined: Sep 04, 2000
Posts: 4
please kindly discuss in datail about applets in java.

Russ, Pastorchik

Joined: Nov 25, 2000
Posts: 2
Your bottom Frame must have a name. Let's say it's "BFRAME". Your Applet must have also been given a name. Let's say it's "BApplet". You can refer to your applet from an HTML script event using the name of the Applet and the proper document referencing such as:
<FORM NAME=form1>
<INPUT TYPE=Text NAME=field1 LENGTH=50 onChange="top.BFRAME.document.BApplet.mymethod(param1,param2,...)">
You must reference the parent window "top" first, then the frame name "BFRAME", then "document", then your Applet name (from NAME= in <APPLET> tage), and then the methods. Put literals in single quotes.
I agree. Here's the link:
subject: Applet