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

browser back button, IE /netscape compatibility, set focus on a field

Status
Not open for further replies.

viztek

Programmer
Nov 7, 2000
30
IN
Hi there,

I face some urgent issues.

1. Specify a resouce to find out compatible javascript for both IE as well as netscape
2. I want to disble browsers BACK button IE 5.5 / NN 6.0 +. how do i do iy?
3.i want to validate a field but in netscape after onblur event the focus moves on to the next field . how do i set focus() on an input field in netscape.

Waiting for a prompt reply

Viztek
 

1. just search Google for "cross-browser javascript" and you'll find what you need.

2. Impossible. Even if you manage to reduce it's functionality it will NOT be welcomed by your visitors. I personally close the window immediately if I see something like this.

3. You asked a general question so I give a general answer: focus() function works the same in all browsers (btw, IE and N are not the only ones existing, do you know it?). If it doesn't work as expected - search for errors.
It should be something like this:

[pseudocode]
. . .
if (document.formName.fieldName.value != [desired value or range])
document.formName.fieldName.value = "";
document.formName.fieldName.focus();
. . .

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top