The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

RE: Posting applet

Posted by Kishori Sharan on March 29, 2001 at 9:35 AM

Hi
If I understand your problem correctly then it is like:
"You have a HTML page. The page contains a form and an applet. User will enter some data in applet. When user clicks the submit button then you want to read the data from applet and then post those data along with form to server."
YOu can accomplish this as follows.
1) For data you want to read from applet provide a getter method. For example, if your applet has a name filed then define a getName() method in applet which will read the name and return it as a string. In your HTML form bind the onSubmit event of the form with a JavaScript function e.g. readApplet(). So your foem tag will look like


....


The code for readApplet function will be

Thanx
KIshori



Replies:
  • ui oioi;h December 09, 2001 at 1:54 PM (0)
  • l[] p[] December 09, 2001 at 1:49 PM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us