aspose file tools*
The moose likes Applets and the fly likes passing parameters to applet dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "passing parameters to applet dynamically" Watch "passing parameters to applet dynamically" New topic
Author

passing parameters to applet dynamically

ritu mahajan
Greenhorn

Joined: Apr 12, 2002
Posts: 5
Hi,
I need to develop an applet that generates a Bar graph by getting values from a spreadsheet that a user enters.
The spreadsheet is an HTML file with some JavaScript.
How do I get the values from the spreadsheet and pass it to the applet class in order to generate thr bar graph?
thanks.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Ritu,
You would use JavaScript to create the HTML file that used the PARAM HTML tag to send in the values to your applet.
Then your applet would use the getParameter method inside its' init method.
FOr example:
HTML CODE:
< APPLET CODE="Ex" WIDTH=200 HEIGHT=100 >
< PARAM NAME="Value1" VALUE="35" >
< /APPLET >
Applet Code:

Regards,
Manfred.
ritu mahajan
Greenhorn

Joined: Apr 12, 2002
Posts: 5
Originally posted by Manfred Leonhardt:
Hi Ritu,
You would use JavaScript to create the HTML file that used the PARAM HTML tag to send in the values to your applet.
Then your applet would use the getParameter method inside its' init method.
FOr example:
HTML CODE:
< APPLET CODE="Ex" WIDTH=200 HEIGHT=100 >
< PARAM NAME="Value1" VALUE="35" >
< /APPLET >
Applet Code:

Regards,
Manfred.
ritu mahajan
Greenhorn

Joined: Apr 12, 2002
Posts: 5
Originally posted by Manfred Leonhardt:
Hi Ritu,
You would use JavaScript to create the HTML file that used the PARAM HTML tag to send in the values to your applet.
Then your applet would use the getParameter method inside its' init method.
FOr example:
HTML CODE:
< APPLET CODE="Ex" WIDTH=200 HEIGHT=100 >
< PARAM NAME="Value1" VALUE="35" >
< /APPLET >
Applet Code:

Regards,
Manfred.

Thanks Manfred.
I'll try that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing parameters to applet dynamically
 
Similar Threads
Urgent
Applet Serialization
fluctuation
Print an Applet with charts from Netscape
Creating Charts in Applets using Data from Database