[thelist] JS: Arg! Netscape 4.7 & site check.

Richard Bennett richard.bennett at skynet.be
Fri Nov 23 05:34:57 CST 2001


Hi,
for your NS4 problems:
1) NS4 can't reference an images source by id, so each image you want to
change the source of needs ,name="Home" id="Home" .(7 images in your case)
2) id is not in capitals
3) NS4 regards a <div> which has an id to be a separate document, so you
have to step through the documents to reach your image, your roll-over
script should look like this (with the values hard-coded):

function imageChange(imageID,imageFile,imageID2,imageFile2) {
   if(document.layers){
      document.LinkImagesDiv.document.images[imageID].src = eval(imageFile +
".src");
      document.TagLineDiv.document.images[imageID2].src = eval(imageFile2 +
".src");
   }else{
      document.images[imageID].src = eval(imageFile + ".src");
      document.images[imageID2].src = eval(imageFile2 + ".src");
   }
}
(watch line-breaks)
The roll-over script could be a lot more compact - but it works ok.
4) NS4 has a well known resize-bug, consisting of two parts,
firstly, it's rendering of divs with CSS positioning breaks completely (as
opposed to if you used layers), when the browser is resized.
The solution for this is to reload the page when the browser's resize event
is fired, but the second bug is that the
resize event will also fire depending on whether scrollbars are showing or
not.
There is a standard script that you include in your page to counter these
bugs, the result is not elegant,
as the page reloads when you resize the browser, but it's the only simple
way to solve the problem. :

  //NS4 resize fix:
  NS4 = document.layers;
  if (NS4) {
        origWidth = innerWidth;
        origHeight = innerHeight;
     }
  function reDo() {
     if (innerWidth != origWidth || innerHeight != origHeight)
        location.reload();
  }
  if (NS4) onresize = reDo;


Aside from that the page looks nice, the code is well-laid out, if a little
verbose, and the color-scheme and design is quite appealing.
I guess all the roll-over stuff could be done with text/css - but you used
alt-tags and the page works without images/javascript, so that looks good.
There's quite a few minor syntax errors in there though. (capitalization
etc)

Cheers,
Richard.
www.richardinfo.com

----- Original Message -----
From: "Frank" <framar at interlog.com>
To: <thelist at lists.evolt.org>
> Please checkup a beta mockup dressing for one of my apps at:
>
> http://www.framarstudios.com/Debug/
>
> I've got some roll over code that works just fine in every 4.x, 5.x
> browser 'cept for Netscape Navigator 4.7





More information about the thelist mailing list