Arnaud <[EMAIL PROTECTED]> wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:
> Pratik,
> sorry, but I do not understand we you wanted to show me.
>
> I indeed have this error in the javascript consol. Thus, I suppose this
> is a
>
> javascript problem. But why this page display correctly with IE6?
>
> Is it an already known bug of mozilla, or do I miss something?
You missed something.
The javascript does a browser check and then does different things depending
upon the browser detected. In other word the author wrote versions tailored
to specific browsers but Mozilla was not on of them. The code concerned is:
isM = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
The Array MT is declared, however it is declared as such:
if (isM) {
MT = new Array(7);MA = new Array(7);
}
I snipped most of the initilisation code etc because it isn't needed.
In Internet Explorer the following values are returned:
document.layers = undefined
document.all = [object]
This results in isM = true and MT is therefore declared.
In Netscape 4.x the following values are returned:
document.layers = [object LayerArray]
This also results in isM = true and MT is thereforce declared
In Mozilla (and, incidentally also in Opera) this is what happens:
document.layers = undefined
document.all = undefined
This results in isM = undefined therefore MT is not declared.
If memory serves me correctly, document.layers and document.all are both
proprietary commands. It is therefore no surprise that they do not work in
anything except the browser that they were created in (remember, current
Mozilla is very different to old Netscape).
If you want to test the variables for yourself I put up a little test
script:
http://www.fidei.co.uk/test.html
--
Colin
*Drop DEAD from the email address to reply*