[thelist] JavaScript chunk: Internet Explorer 5.5 versus Opera 6, Netscape Navigator 4.77

Syed Zeeshan Haider zeeshan_paki at yahoo.com
Fri Mar 8 14:33:01 CST 2002


Hi Duncan O'Neill,
Thank you for taking time to reply me. I was away for some time,
therefore, I am replying late.
Let me confess that I have never tried to write a cross-browser
compatible script. This time I felt a need to do this but too complex
script is a great obstacle for me. I just copied a part of script in my
post. Other script on the page (from which I copied JS) is very complex
(perhaps only for me because I am not very experienced and I wrote it
after a very hard work). I mostly write IE compatible JS. The web pages
are on my local machine, because I want them to be more dynamic and
bug-free before being online.
I do not clearly know how NN 4.x deal JS. Therefore, I need some further
explanation for following line:
document.layers['rut'].document.layers[imgName].src='whatever';
"layers" is confusing. Why am I supposed to use layers for NN 4.x?
Thank you,
Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/

----- Original Message -----
From: "Duncan O'Neill" <dbaxo at ihug.co.nz>
To: <thelist at lists.evolt.org>
Subject: Re: [thelist] JavaScript chunk: Internet Explorer 5.5 versus
Opera 6, Netscape Navigator 4.77
Date: Thu, 7 Mar 2002 12:44:09 +1300
Organization: The Urban Legend magazine
Reply-To: thelist at lists.evolt.org

Syed,

There are two things I can see which are likely to
be causing problems with N4.x, and a third which
is a possible hiccup;

1) You have to access the <divs> and their contents
differently. You may have to do something hideous like;

document.layers['rut'].document.layers[imgName].src='whatever';

2)Netscape 4.x uses 'show' and 'hide' instead of 'visible'
and 'hidden' on  <divs>. So you need to do;

if (document.layers){visible='show';
                     hidden='hide';}
else {visible='visible';
      hidden='hidden'; }

at the top of yr script, and then you can set the visibility
properties with variables instead of strings.

3) Netscape 4.x sometimes has difficulties if the styles on the
<div>s are  declared inline.

sorry I have no ideas about Opera 6, as you give no URL.

hth,

Duncan O'Neill
=============================================
----- Original Message -----
From: "Syed Zeeshan Haider" <zeeshan_paki at yahoo.com>
To: "Evolt" <thelist at lists.evolt.org>
Sent: Thursday, March 07, 2002 12:30 AM
Subject: [thelist] JavaScript chunk: Internet Explorer 5.5 versus Opera
6,
Netscape Navigator 4.77


> Hello Experts,
> I have a part of JS which does not work well with Opera 6 and Netscape
> Navigator 4.77 and 4.79. I have asked this question earlier with
> slightly different subject, but I got no response, therefore, I am
> asking again.
> Here are the details of my question:
> Opera does not give any error but JS does not work as it should be (or
> as it works in IE 5.5). Netscape Navigator 4.77 and 4.79 do give
errors.
> Here I copy that part of JS which is not working in Opera 6 and
Netscape
> Navigator 4.77 and 4.79:
>







_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the thelist mailing list