PDA

View Full Version : Stupid question


paulj
08-06-2007, 06:31 PM
Ok this is a stupid question but I am drawing a blank and im sure it is HTML related and not JS. Anyway what I am trying to remember is, how do I set the cursor to be in a text box in a form when the page loads? Thanks alot for the help

theUKdude
08-07-2007, 02:59 PM
<body onload="document.myform.myfield.focus()">where myform is the 'name' attribute of your form and myfield is the 'name' attribute of your field.

hth

theUKdude