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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Value Replacement

Status
Not open for further replies.

drose00

Technical User
Sep 16, 2006
3
US
I'm new to forms/javascript and I need to have a value in a value in a form get text (mirror) from a value in a text field. This is the code I have currently:

<p>
<input type="text" id="txtTotal" size="8"/>
</p>
<input type="hidden" name="string" value="txtTotal.getText();">

I know this is wrong. How should this be done?
 
This is the best I can salvage from the lines shown. Get the basic on your own rather than speculating on how things work.
[tt]
<p>
<input type="text" id="txtTotal" size="8" onblur="this.form.elements['string'].value=this.value" />
</p>
<input type="hidden" name="string">
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top