Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question on using JavaScript to set form value

Status
Not open for further replies.

rickcols

Programmer
Oct 26, 2004
1
US
Hi, guys:

What I am trying to do is: once a preset value is modified on my
jsp page, I need to fire a JavaScript event and set boolean value of
another form variable to true. This boolean value will be used in the
next action class once my form is submitted:

function valueModified(form)
{
var boolValue=new Boolean(true)
document.forms[0].valueModified.value = boolValue.valueOf();
}

<input type="text" name="myValue" maxlength="16" size="40" value="" onchange="valueModified(this.form)">
</td>

I keep getting "false" value inside action class, it seems this value is
not set.

I am wondering how I can solve this problem, or is there a better way to do it to let next action know this value is modified?

regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top