Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically param value from same HTML

 
Pragnesh Shah
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic