ianmh
12-24-2003, 01:12 AM
I know how to get a form field to focus using name in a form. But name is now deprecated in XHTML. I’ve tried replacing name with id but that gives a javascript error.
<body onload="document.signon.userName.focus()>
Then
<input id=”signon” …..
Doesn’t work.
Also tried getElementById, but that didn't work either.
Any ideas how to get this to work without using a name in the form.
Thanks
<body onload="document.signon.userName.focus()>
Then
<input id=”signon” …..
Doesn’t work.
Also tried getElementById, but that didn't work either.
Any ideas how to get this to work without using a name in the form.
Thanks