Having a very huge application, I have lots of forms (with absolutely unique IDs) and many Field-Ids that are [COLOR=”Red”]NOT
[FONT=”Courier New”][SIZE=”2″]
[COLOR=”Navy”]<form id=’formaaa’>
<input id=’project_id’ … />
…
</form>
<form id=’formbbb’>
<input id=’project_id’ … />
…
</form>
It is not possible to make the field-ids unique!!
Prototype’s $F() function can’t handle this.
I am searching for an absolute reference, that works in Mozilla too. And I want to avoid “name=” for Form and Field!
[FONT=”Courier New”][SIZE=”2″][COLOR=”Red”]function putfieldvalue(pForm,pField,pValue) {
????? = pValue;
}
for ????? I tried all of the following (all don’t work):
[FONT=”Courier New”][SIZE=”2″]document.getElementByid(pForm).getElementByid(pField).value
— or —
[FONT=”Courier New”][SIZE=”2″]wform = document.getElementByid(pForm);
wform.pField.value =
— or —
[FONT=”Courier New”][SIZE=”2″]wform = document.getElementByid(pForm);
wfield = document.getElementByid(pField);
wform.wfield.value =
— and many others.
Can anybody help me? I’m really stuck.