raf
11-21-2003, 10:16 PM
I'm writing a form-engine to dynamically build and proces forms. The deal is that the formfields get the primary key value from a formfield-table as their name, and i dynamically set the focus on one of the fields. Whitch looks like
<body onload="document.forms[0].elements['56'].focus();">
the formfield then looks like
<input type="text" id="56" name="56" value="bar" />
For some reason, this doesn't work. If i put a character in front of the fieldname, all is fine, but on numerical names, i get an error
like
document.forms[0].elements['56'] is empty or not an object.
Anyone knows a fix for this ?
<body onload="document.forms[0].elements['56'].focus();">
the formfield then looks like
<input type="text" id="56" name="56" value="bar" />
For some reason, this doesn't work. If i put a character in front of the fieldname, all is fine, but on numerical names, i get an error
like
document.forms[0].elements['56'] is empty or not an object.
Anyone knows a fix for this ?