Ah, the wonders of DHTML...
Ah, the wonders of DHTML...
Join the DZone community and get the full member experience.Join For Free
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.
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.
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
in your <BODY> tag.
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
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”>
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
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
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
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.
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.
Published at DZone with permission of Jeff Blankenburg , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.