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

My javascript works in IE, but not Netscape

Netscape/IE differences

My javascript works in IE, but not Netscape

by  bgreenhouse  Posted    (Edited  )
This is the problem I had: I had a nice validation function that worked in IE, but wouldn't work in Netscape, the problem being when I called it to focus back on the offending element of the form (the one that wasn't filled in properly), Netscape wouldn't do it. After a lot of searching, I figured out that it was because my form was in a layer made with the <div> tag. Apparently, in Netscape, JavaScript finds it difficult to access things in these layers if they have a style attribute in them (e.g. <div style=blablabla>). I'm sure that there must be a better way around this, but the way I found it for now is to actually put your function within that layer. After the opening <div> tag, put in a <script> tag and put your function right there. It seems to work pretty well.

What a pain in the a@#. I hope this saves you some of the time it took me.

Ben
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top