By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

Populating a hidden text box with same data as other text box

P: 17
Sample code snippet -

<td align="right">Check Amount:&nbsp;</td>

(1) <td><input type="text" name="CHK_input_1" size="19"style="text-align:right" onkeyup="calcCB();" onBlur="currency(this); calcCB();" tabindex="26">

(2) <input type="hidden" name="OBKey__53_1" id="kw_check_amount" >

For various database reasons, I need to be able to populate a hidden field to be used as a keyword in our system based on the first input field.
For instance, I need to enter a check amount into field (1) at the same time I need to populate the hidden text field (2) with the same data.
All references I have found so far are for populating textbox through a dropdown list. This is not what I need to do.
Do I need to create a method to populate the hidden field with the same information?
I would need to do this multiple times on the same form. If so How would I go about performing this?
Is there any easier way to populate both form fields at the same time?
Feb 29 '08 #1
Share this Question
Share on Google+
2 Replies

rnd me
Expert 100+
P: 427
Expand|Select|Wrap|Line Numbers
  1. (1)    <td><input type="text" name="CHK_input_1"  size="19"style="text-align:right"  onkeyup="calcCB();" onBlur="currency(this); calcCB();"  tabindex="26"    onchange="document.getElementById('kw_check_amount').value=this.value">
  2. (2)    <input type="hidden" name="OBKey__53_1" id="kw_check_amount" >      

there seems to be something weird above, and i can't seem to edit it out, but there is no space in the word 'this'...
Mar 1 '08 #2

P: 17
Thanks for saving me again. U Rock!
Mar 3 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.