Over a million developers have joined DZone.

Ah, the wonders of DHTML...

DZone's Guide to

Ah, the wonders of DHTML...

· Web Dev Zone ·
Free Resource

Access over 20 APIs and mobile SDKs, up to 250k transactions free with no credit card required

Yes, that’s not a typo.  This article should have been published 10 years ago.  It’s about DHTML, and apparently Netscape 4.7.

Today, I was cleaning my office and found an old journal that I had created in the summer of 2000.  It was a set of specific workaround for the different browsers at the time, like Internet Explorer 4 and Netscape Navigator 4.7.

File:Internet Explorer 5 logo.svg                                                           

Here’s a look at a few of the pages from this journal:


Browser compatibility was so bad that I actually kept a journal of all of the workarounds I had discovered.

WP_000384 (1)

Scrolling in Netscape 4.7 with <DIV>s

If you have a <DIV> that extends outside the viewable browser windows, the scrollbars will not show up in Netscape 4.7, if you have

marginheight=0 marginwidth=0

in your <BODY> tag.

WP_000386 (1)

Referencing <DIV>s in IE 4.0+, Netscape Navigator 4.7, and Netscape 6.0

First, each <DIV> should be an independent element whose direct parent is the <BODY>.

IE 4.0+     document.all.divName.style.attribute

NN 4.7       document.divName.attribute

NN 6.0       document.getElementById(“divName”).style.attribute

WP_000383 (1)

Radio Button Backgrounds

If you have a radio button in a table cell which has a different background color than the <body>, Netscape 4.7 will apply the background color of the body to the radio button.

To prevent this, apply a CSS class directly to the radio button tag.

<input type=”radio” name=”radio2” class=”whiteRadio”>


WP_000387 (1)

Javascript Date Functions

date = new Date();

day = date.getDay();  //returns 0-6

number = date.getDate();  //returns 1-31

month = date.getMonth();  //returns 0-11

year = date.GetFullYear();  //returns 2000

WP_000388 (1)

Operating System Detection

if (navigator.appVersion.indexOf(“Mac”) != –1

if (navigator.appVersion.indexOf(“Win”) != –1

if (navigator.appVersion.indexOf(“X11”) != -1

if (navigator.appVersion.indexOf(“Linux”) != –1

WP_000385 (1)

Referencing <IMG> inside a <DIV> in NN 4.7 et. al.

Each <IMG> must have a unique name.

<IMG NAME=”imgName” src=”img.gif”>

IE 4.0+, NN 6.0     document.imgName.src

NN 4.7                   document.divName.document.imgName.src

WP_000382 (1)

Underscores in <DIV> names

Netscape 4.7 does not allow this.  Instead of “this_container,” use “thisContainer” or some other variation.


I recall having aspirations of putting a published book together with all of these tips. Here’s a few observations I made about ME as a developer 12 years ago.

1) I had absolutely no business being employed as a software developer.

2) Browser compatibility, for all we complain about it, is nowhere near as bad as it was.

3) Apparently, I capitalized all of the tags and their property names in HTML.

4) When remembering Javascript, I apparently wasn’t too worried about semicolons.

5) I remember treating this book like Henry Jones Sr. treated his grail diary.  It held all of the secrets to unlocking the power of the web.

Do you have any silly old stuff like this laying around?  I’d love to hear your stories about old development practices you employed.

#1 for location developers in quality, price and choice, switch to HERE.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}