Hi all,
I am attempting to send the value (if changed) of one text box to a later text box on the same form. I can update the subsequent text box with a predefined value that I send the function, but am I able to send the function the value of the text box that is linked to the onBlur event? Here is what I am attempting:
<form method="POST" action="MountValuation2.cfm" name="first_form">
<input type="Text" name="mount_weight" value="0.000" size="10" onBlur="writeIt('blur');">
<input type="Text" name="adj_weight" value="0.0000" size="10">
</form>
Then, my function defined in the header is as follows:
<script language="JavaScript">
<!--
function writeIt(the_word)
{
var word_with_return = the_word;
window.document.first_form.adj_weight.value =
word_with_return;
}
// -->
</script>
I want the value of the adj_weight text box to have the same value as that of the mount_weight text box if changed by the user. Here, it changes to the word "blur". Is this possible to manipulate the value of one text box based on the value of another on the same form?
Thanks so much!
Jami
I am attempting to send the value (if changed) of one text box to a later text box on the same form. I can update the subsequent text box with a predefined value that I send the function, but am I able to send the function the value of the text box that is linked to the onBlur event? Here is what I am attempting:
<form method="POST" action="MountValuation2.cfm" name="first_form">
<input type="Text" name="mount_weight" value="0.000" size="10" onBlur="writeIt('blur');">
<input type="Text" name="adj_weight" value="0.0000" size="10">
</form>
Then, my function defined in the header is as follows:
<script language="JavaScript">
<!--
function writeIt(the_word)
{
var word_with_return = the_word;
window.document.first_form.adj_weight.value =
word_with_return;
}
// -->
</script>
I want the value of the adj_weight text box to have the same value as that of the mount_weight text box if changed by the user. Here, it changes to the word "blur". Is this possible to manipulate the value of one text box based on the value of another on the same form?
Thanks so much!
Jami