adamfletcher1
03-10-2005, 06:37 PM
Hi.
This javascript:
function fieldChange() { //v2.0
document.Register.field[27].value = document.Register.lastname.value;
document.Register.field[29].value = document.Register.company.value;
}
does not work.
The form fields field[27] and field[29] are not liked.
Is there a way around this without changing the names of the fields? (The fields MUST have these names).
You can see that I am trying to make the value of two hidden fields the same as two text fields in a form.
Here are the textfields:
<input name="lastname" type="text" style="width:200px" value="" onChange="fieldChange();">
<input name="company" type="text" style="width:200px" value="" onChange="fieldChange();">
Here are the hidden fields:
<input name="field[27]" type="hidden" value="(put value of lastname here)">
<input name="field[29]" type="hidden" value="(put value of company here)">
Warm Regards,
Adam
This javascript:
function fieldChange() { //v2.0
document.Register.field[27].value = document.Register.lastname.value;
document.Register.field[29].value = document.Register.company.value;
}
does not work.
The form fields field[27] and field[29] are not liked.
Is there a way around this without changing the names of the fields? (The fields MUST have these names).
You can see that I am trying to make the value of two hidden fields the same as two text fields in a form.
Here are the textfields:
<input name="lastname" type="text" style="width:200px" value="" onChange="fieldChange();">
<input name="company" type="text" style="width:200px" value="" onChange="fieldChange();">
Here are the hidden fields:
<input name="field[27]" type="hidden" value="(put value of lastname here)">
<input name="field[29]" type="hidden" value="(put value of company here)">
Warm Regards,
Adam