On page load going to a field auto

liunx

Guest
Hi Chaps,<br />
<br />
How can I get the cursor to automatically go to a text field when then page as loaded, rather than a user having to click on it? It's the first field on the page incidently.<br />
<br />
Cheers<!--content-->I use this at the bottom of my document<br />
<br />
<script type="text/javascript"><br />
window.onload = document.form_name.field_name.focus<br />
</script><!--content-->thx for that, worked a treat...<br />
<br />
I just tried something else too that worked, and that was:<br />
<br />
<body OnLoad="InitMenu();TextSurname.focus()" Onclick="HideMenu(menuBar)" ID="Bdy"><br />
<br />
Thx for ur help<!--content-->yes sometimes that does work but is shoddy sometimes. because you can't focus something that isn't there.<!--content-->
 
Back
Top