Click to See Complete Forum and Search --> : form field validation curly matter


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

Willy Duitt
03-10-2005, 06:49 PM
I answered this question for you yesterday somewhere here on this forum where you have posted the exact same question... As well as, Glenn has also answered your question here:
http://www.codingforums.com/showthread.php?t=54132

And I seen this answered on several other forums as well...
If you don't understand something, rather than waste peoples time by continually posting the same question and recieving the same answers you do not understand, why don't you try returning and asking for further clarification... Unless of course, you can not remember all the places you posted the same question, in which case, try turning notifications on...

.....Willy

adamfletcher1
03-10-2005, 07:02 PM
Thanks Willy.

Not trying to waste anyone's time.
I have notifications on but did not receive one.
I thought perhaps I hadn't explained the situation properly and therefore had not received any replies.

Once again, thanks for your persistence and I will investigate:
elements["field[27]"]
as well as server-side validation...

All the best,
Adam



:D