tallberg Posted April 14, 2007 Share Posted April 14, 2007 Hi How do i make the curser start flashing in the first feild of a form when the page loads? Thanks Quote Link to comment Share on other sites More sharing options...
paul2463 Posted April 14, 2007 Share Posted April 14, 2007 by using the focus() command <BODY BGCOLOR="ffffff" onLoad="document.formname.textboxname.focus()"> Quote Link to comment Share on other sites More sharing options...
tallberg Posted April 15, 2007 Author Share Posted April 15, 2007 Afraid that didnt work. Quote Link to comment Share on other sites More sharing options...
paul2463 Posted April 15, 2007 Share Posted April 15, 2007 might sound a silly question but you did use your own formname and textboxnames in the command didnt you? Quote Link to comment Share on other sites More sharing options...
tallberg Posted April 15, 2007 Author Share Posted April 15, 2007 I did. Quote Link to comment Share on other sites More sharing options...
nogray Posted April 16, 2007 Share Posted April 16, 2007 let's say your input field id is "name" <input type="text" id="name" ... use this <body onload="document.getElementById('name').focus();"... make sure the field is not hidden by CSS. Quote Link to comment Share on other sites More sharing options...
tallberg Posted April 17, 2007 Author Share Posted April 17, 2007 Thank you. that worked 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.