charlier Posted April 18, 2008 Share Posted April 18, 2008 I find it a pain that there's no automatic cursor in the text boxes on the pages. Mainly I'd like to have one for the login box. Can someone please tell me how to pull this off? 0 Quote Link to comment Share on other sites More sharing options...
Baja Posted April 22, 2008 Share Posted April 22, 2008 Maybe this will help - Google: how do i have the cursor placed in the text field on page load 0 Quote Link to comment Share on other sites More sharing options...
Nick Posted April 22, 2008 Share Posted April 22, 2008 Or take a look at google itself, it autofocuses on the search box: A javascript function is defined: function sf(){document.f.q.focus()} (The form which the search box is in has its name parameter set to 'f', the search box's name parameter is set to 'q') It then calls sf() in the body tag's onload event. Ta da. 0 Quote Link to comment Share on other sites More sharing options...
joe123 Posted April 23, 2008 Share Posted April 23, 2008 <body OnLoad="document.formfocus.firstname.focus();"> <form name="formfocus"> First Name: <input type=text name=firstname size=20> Family Name: <input type=text name=familyname size=20> </form> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.