The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 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:

html -> applet

Posted by Milan Maksimovic on May 05, 2001 at 7:48 PM

> How can al applet embebed inside an html document get the >input from an html form?

Let's say that your applet (the class that subclasses Applet) is called ... ummm, YourApplet, and that it has a function that goes like this:

public void doDaThing(String thingToDo)
{
// here we do the thingToDo
}

You can call this function by responding to an text field action in the html page like this:

---- HTML, cut here -----




name="symbolform"
action="javascript: addSymbolToApplet();"
method="method"
onSubmit="return addSymbolToApplet();">





-- end of html ----

Regards,
M.



Replies:

Sponsored Links



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