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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setfocus?

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi,

If I wanna set the focus to a certain textbox on my page when it has been loaded, what should the html code be?

<input type=text name=MyText... - ...and what should the &quot;setfocus&quot; code look like?

//thanx
 
<html>
<head>
...
</head>
<body onload=&quot;document.myform.mytext.focus()&quot; ... >
...
<form name=&quot;myform&quot;>
...
<input type=&quot;text&quot; name=&quot;mytext&quot;>
...
</form>
...
</body>
</html> ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top