[thelist] JS / deprecated statement warning

Mark Kennedy mark at eurogamer.net
Tue Mar 2 10:31:48 CST 2004

Hi there,

>looks like a typo??
>onresize=MM_reloadPage(); }}
>instead of
>onresize=MM_reloadPage; }}

No, I think that's probably right.  It's assigning a handle to the MM_reloadPage
function to the onresize property of the navigator object.

What I think it is, is the 'with' here

>>    if (init==true) with (navigator) {if

I base that judgement on the error message itself

> Warning: deprecated with statement usage, Line 7:
and not the line number it claims the error is on.

I've never used 'with' but I seem to remember it being used to switch the
current context to that object, such that all references to 'variable' from then
onwards actually refer to (in this instance) 'navigator.variable'.

Try removing 'with (navigator)' and prepending 'navigator.' to all variable
names that don't already specify an object, such as making

>>    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)


>>    else if (navigator.innerWidth!=document.MM_pgW ||

Hope that fixes it.  I'm not too hot on this old NS4 stuff.


More information about the thelist mailing list