Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading a page with the text box ready to be typed in (google homepage

Status
Not open for further replies.

khoury

Technical User
Aug 8, 2002
12
US
I want to make a page that loads with the text box initially selected but can't find anything about it. I know that the Google home page does this and I have seen others. Is it perhaps a server side thing? I would think it could be done with javascript but could easily be wrong. I love being able to jump on google and just start typing and wish to use that efficiency on my own stuff. Thanks ahead.
 
Very simple:
[tt]
<body onload=&quot;document.someform.sometext.focus()&quot;>
[/tt]
Then don't forget to name the form and text field in the html:
<form name=&quot;someform&quot;>
<input type=&quot;text&quot; name=&quot;sometext&quot;>
...
</form>

 
Thanks a lot! It worked perfectly. Your help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top