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

form validation in Netscape 6

Status
Not open for further replies.

TrevorH

Programmer
Jan 9, 2001
9
US
Does anyone know how to focus on a text entry field in a form after an alert in Netscape 6?

My code goes something like this:

alert("Sorry, wrong answer.");
ansObj.focus();
ansObj.select();
return false;

In Netscape 4, the browser waits till you close the alert (by hitting return) and then it focuses on the text field (so you can type a new answer without using the mouse).

In Netscape 6 though, the focus doesn't return to the form, so the user has to use the mouse and click in the text field again.

Anyone know how to fix that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top