Problem chaining JavaScript files with Netscape 7

Firefox, Thunderbird, SeaMonkey, Camino, Mozilla, Netscape 6/7/8/9, and all Gecko-based browsers discussion and support forum.
(MozInfo701, Netscape Browser Archive)

Moderators: Antony, Edward, profman, Ramona

Problem chaining JavaScript files with Netscape 7

Postby yandina » Sat 04 Jan, 2003 4:45 pm

My site doesn't work with the latest Netscape browsers.
I link my JavaScript files by inserting the following type of line in a JavaScript soruce file that is loaded from the HTML page.

document.write('<SCRIPT language="JavaScript" SRC="xxxxxx.js"> </SCRIPT>');

which causes the next file in the chain to be loaded after returning to the HTML from the current file.

This has always worked with IE and older Netscape browsers. Why does it fail in the latest version?

Since less than 10% of my customers are using Netscape, should I even bother?
UserAgent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)
yandina
new member
new member
 
Posts: 4
Joined: Sat 04 Jan, 2003 4:25 pm

Postby DJGM » Sat 04 Jan, 2003 4:53 pm

Your code may not comply to recommended web standards. This is one of
the differences between the Mozilla based versions of Netscape, and other
browsers based on older v4.x rendering enignes like NS4.x and IE4.x-6.x.

I recommend you check with the W3C Markup Validation Service, that your
code is all fully valid. As newer versions of Netscape, based on the Mozilla
codebase, have high compliance to recommended W3C web standards,
any pages that are not coded correctly, while they may well work in
outdated, obsolete browsers like Netscape Communicator and IE,
they may fail to work correctly in Mozilla based browser.

The main benefit of writing your code to comply with web standards, is that
you don't need to make different versions of your web pages for different
browsers. The golden unwritten rule, is "write once, read anywhere",
just as long as you code pages that adhere closely to standards.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.0.2) Gecko/20021120 Netscape/7.01 (CK-DJGM-i.net)
SeaMonkey = Swiss Army Knife: It's versatile, reliable, and contains useful tools.
Windows Internet Explorer = Old Swiss Cheese: Full of holes, and it stinks!
User avatar
DJGM
diamond member
diamond member
 
Posts: 4572
Joined: Wed 19 Jun, 2002 1:03 pm
Location: Manchester, England, UK

Postby yandina » Sat 04 Jan, 2003 5:25 pm

You are 100% correct.
When I put all the links in-line it still didn't work so I'll have to debug the contents of the one that is dying. An error somewhere is preventing the whole page from loading.
Meanwhile I just put a pop-up alert to tell Netscape users the site is not working for them and I'll fix it when I get time. Hardly worth the bother however.
Personally I'll be quite content when Netscape fades into the sunset. With due respect to the die hards, Netscape has been a PITA. For every hour I spend on writing and debugging for IE, I spend another 3 or 4 hours trying to make it work on Netscape and often failing. They may be purists but my viewers with Netscape have dropped from about 30% to about 10% so if they don't get real, they may be ex-purists.
Thanks for your help and I hope I didn't make too many enemies here by pointing out a problem with the King's clothes.
UserAgent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)
yandina
new member
new member
 
Posts: 4
Joined: Sat 04 Jan, 2003 4:25 pm

Postby yandina » Sun 05 Jan, 2003 3:11 pm

Don't panic, I fixed it and removed the pop-up alert.

As browser version numbers get higher, and the standards get tighter and tighter, hundreds of millions of older HTML pages are going to become unavailable to viewers with the latest upgrades. I've personally encountered this phenomena already with the latest version of uSoft IE and ended up uninstalling it so I could continue to access some web pages.

If upgrades continue to become more and more anomalies and abandoned in the quest for compatibility they will be counter productive to the lofty goals of raising compliance with standards. Until such time as the BULK of the Internet gets cleaned up, the browsers will need to be UPWARDS COMPATIBLE or remain unused curiosities.
UserAgent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)
yandina
new member
new member
 
Posts: 4
Joined: Sat 04 Jan, 2003 4:25 pm


Return to Firefox, SeaMonkey and Netscape

Who is online

Registered users: Google [Bot]