aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Form input type=hidden  - is it possible to set values dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Form input type=hidden  - is it possible to set values dynamically" Watch "Form input type=hidden  - is it possible to set values dynamically" New topic
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: 15376
    
    6
<input type="button" onclick='document.FormName.HiddenElementName.value="Your Answer"' name="Button" value="Button">
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form input type=hidden - is it possible to set values dynamically
 
Similar Threads
How to dispatch different web pages by clicking ddifferent buttons in Form
How to set multiple parametes in a form
Default Enter key and submit BUTTON
request.getParameter() and JavaScript
Need help with Jquery