Forum Moderators: open

Message Too Old, No Replies

Cross-browser html and javascript

Netscape 4.x, IE4+, Netscape 6.x+... how to predictably code for them all

         

sitebasics

3:13 pm on Jul 8, 2003 (gmt 0)

10+ Year Member



Greetings -

I'm working on multiple projects which need to be equivalent in Netscape 4.x, IE4+ and Netscape 6.x+

They need to look the same, behave the same, have the same functionality wrt form verification and submission, dhtml, etc.

Can anyone point me to some thorough documentation on cross-browser/cross-DOM creation of html and javascript?

I'm working in text editors only -- no DW, FP, etc.

Thanks in advance
Kay

korkus2000

6:28 pm on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should look at creating a tree for IE4 compliant browsers and NN4. I don't know about a site, but you can start at netscapes development site. Code the page for NN4 first. You should be able to do anything on the other browsers that NN4 can do.

txbakers

9:10 pm on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



They need to look the same, behave the same, have the same functionality wrt form verification and submission, dhtml, etc

Unfortunately, they won't. That's the nature of the two different browsers. Even basic HTML renders differently in the two browsers, especially in version 4.

The DOM for Netscape 4 and IE 4 is very different, so you would need two sets of javascript to make sure it worked in both. Netscape 7 works more like IE 5.5, but not entirely the same.

g1smd

10:52 pm on Jul 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Visit the validator using [validator.w3.org...]

You will probably need to aim for something like "HTML 4.01 Transitional" compliant code.

On the design side, make your code tidier by exporting all CSS and JS to external files as well.

Use the @import method to access the external CSS file otherwise your page will have overlapping elements on it in Netscape 4.

SethCall

11:54 pm on Jul 8, 2003 (gmt 0)

10+ Year Member



Yeah if your project was :

IE6 and NS 7
then your job would be entirely possible.

otherwise, its going to be rough. There is a resource though,

Its stickied to you

sitebasics

5:37 pm on Jul 9, 2003 (gmt 0)

10+ Year Member



[... Unfortunately, they won't. That's the nature of the two different browsers. Even basic HTML renders differently in the two browsers, especially in version 4... ]

Ah, yes, the story of my life... tell this to our Design group. It's been an ongoing battle, over the years (literally) to get them to give a little, by way of exact placement and alignment. I'll spare you the tales of woe... rest assured that browser discrepancies have been a "hard sell" in these parts >:(

In any case, my new task is to communicate to server-centric programmers the things they need to keep in mind, when working on their client-facing code. We've got a lot of Java developers scratching their heads over the gotchas of cross-browser coding/scripting, and it's my mission (I chose to accept it) to give them the tools they need to minimize pain and suffering.

So, I'm collecting all the external resources (outside of my own brain/experience) I can get my hands on to help them out.

Any additional help from you all would be much appreciated!

Thanks
~K~

me2287

11:09 pm on Jul 9, 2003 (gmt 0)

10+ Year Member



Why do you need to have support for older non-standards browsers such as Internet Explorer 4 (and below) and Netscape 4.7 (and below). You should aim for a site that is fully compatible with:

Internet Explorer 5 + (Win)
Netscape 5 + [product line starts at 6, code name is 5] (Win, Mac, Lin)
Mozilla 1 + (Win, Mac, Lin)
Opera 5/6 + (Win, Lin)
Opera? (Mac) [anyone know the Opera Mac versions?]
Konqueror 3 + (Lin)
Safari 1 + (Mac) [believed to use Konqueror's KHTML engine]

AWildman

12:17 am on Jul 10, 2003 (gmt 0)

10+ Year Member



You know, it may sound cheesey, but I love VisiBone cards to code cross-browser code. It is a very visual and quick way to see which javascript/html/css work cross-browser.