Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
For example: document.myform.myfield.focus() would put the focus in the field myfield in the form myform.
In XHTML Strict where Name is no longer allowed as form identifier this does not work. Does anyone know how I can work around this problem? Thanks.
All you have to do is give the individual fields an ID (the form doesn't need one) .. and refer to those ID's.
For example, consider the following code:
<input type="text" id="mytextfield" \>
<input type="password" id="blah" \>
To refer to the first field you use:
Likewise, to refer to the second field you use:
Simple, all you have to remember is the ID, and call it directly using getElementById
My web site is generated dynamically so putting the getElementById() call in the last frame to load is not a practical solution since each frame are semi-independent from one another.