| Author |
Form input type=hidden - is it possible to set values dynamically
|
Chandhrasekar Saravanan
Ranch Hand
Joined: Jun 16, 2002
Posts: 57
|
|
Hi, I have an form which uses hidden input . is it possible that i can set the value dynamically by click of a button. For example in the following code <script language="JavaScript" type="text/javascript" > var a = ""; function setValue(){ a = "This is testing"; } <Form name=newForm > <input type=button Click="return setValue()" > <input type=hidden value= a > </Form > </script > [/CODE] i just wanted to get the value of the input a in hidden field to be controlled by the button. :roll:
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
|
<input type="button" onclick='document.FormName.HiddenElementName.value="Your Answer"' name="Button" value="Button">
|
 |
 |
|
|
subject: Form input type=hidden - is it possible to set values dynamically
|
|
|