Two Laptop Bag*
The moose likes Applets and the fly likes Dynamically param value from same HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Dynamically param value from same HTML" Watch "Dynamically param value from same HTML" New topic
Author

Dynamically param value from same HTML

Pragnesh Shah
Greenhorn

Joined: Dec 05, 2000
Posts: 3
How i can pass the param value from textbox of html in same html file.(i.e Dynamically param value from same HTML)
Grant Crofton
Ranch Hand

Joined: Nov 08, 2000
Posts: 154
I haven't tried this, so I'm not sure if it works:
You can call methods in your main applet class from script within the HTML page. I'm not sure if you can pass values in the calls ( I guess you can ), but if you can you could use something like this:
<HTML>
<APPLET NAME=myApplet...></APPLET>
<form name=f1>
<input name=textIn>
<input type=button name=b1>
</form>
<SCRIPT language=VBScript>
sub b1_onClick()
myApplet.setName( f1.textIn.value )
end sub
</SCRIPT>
I'm a little rusty on HTML, but that's the idea. This example will only work when the button is clicked, but you could have it cue off any event.
(this assumes the applet class has a function 'setName( String s )' )
Hope that helps/works.
Originally posted by Pragnesh Shah:
How i can pass the param value from textbox of html in same html file.(i.e Dynamically param value from same HTML)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamically param value from same HTML
 
Similar Threads
session cookie problem when UAT and production runs at same time by a user.
Can't accept parameters from an applet
stylesheet messed up in richfaces JSF page
Servlet to applet communication
Dynamic parameter values for applet