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

setfocus nightmare 1

Status
Not open for further replies.

NewbiDoobie

Technical User
Jul 25, 2005
63
US
I have read and read and still have no clue why this does not work:

<body onLoad="MM_preloadImages('Corp/img/try.gif','Corp/img/advantage02.gif','Corp/img/samples02.gif','Corp/img/sales_team02.gif','Corp/img/subscribe02.gif','Corp/img/referral02.gif','Corp/img/privacy02.gif','Corp/img/contact_us02.gif','Corp/img/system02.gif','Corp/img/posts02.gif','Corp/img/testimonials02.gif','Corp/img/hotline02.gif')" "defaultForm.txtUserName.focus()" >

<form name="defaultForm" action="login.asp?uUrl=<%=uUrl%>" method="Post" onSubmit="return(validateForm());">

I need to setfocus on the txtUserName, however it never does.

The only code I can find says: <body onLoad="defaultForm.txtUserName.focus()"

So I am not sure why this is having an issue?
 
shouldn't that be ..

Code:
<body onLoad="MM_preloadImages('Corp/img/try.gif','Corp/img/advantage02.gif','Corp/img/samples02.gif','Corp/img/sales_team02.gif','Corp/img/subscribe02.gif','Corp/img/referral02.gif','Corp/img/privacy02.gif','Corp/img/contact_us02.gif','Corp/img/system02.gif','Corp/img/posts02.gif','Corp/img/testimonials02.gif','Corp/img/hotline02.gif');defaultForm.txtUserName.focus()">

?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top