-
I would like to set the focus to a text-field in a form after the window has completed loading.
Somehow the following code doesn't work:
<script language='JavaScript'>
<!--
onLoad='document.form.textfield.focus()';
// -->
</script>";
When the window loads the particular textfield doesn't get the focus...
Could someone help me with the code to make it work?
Thanx...
-
hmmm
maybe instead of putting the onload within the script, put it in the body tag?
like...
<body onload="document.form.textfield.focus();">