Random geekery since 2005.

Husband, father, programmer, speaker, writer, blogger, podcaster, collector, traveler, golfer.

Ah, the wonders of DHTML…

Written in

by

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:

WP_000381

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.

Summary

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.

Tags

One response to “Ah, the wonders of DHTML…”

  1. Tudor Avatar
    Tudor

    Nice 🙂 I remember the times when we had to choose between layer in NN4 and div in IE, when animated gifs were supported only in some browsers (that’s around 1996 and Netscape Navigator Gold was the hot stuff of the day :)..

    Anyway, why did you use a notebook instead of a text file?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

%d bloggers like this: