[thelist] JS / deprecated statement warning
Ben Morrison
ben.morrison at dogstardesign.co.uk
Tue Mar 2 10:46:36 CST 2004
On 2/3/04 3:43 pm, "Brian W. Reaves" <brian at brianreaves.com> wrote:
> I am getting a warning on the following script:
>
> function MM_reloadPage(init) {
> if (init==true) with (navigator) {if
> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);
>
> This script is used to fix a resize bug in NS 4X browsers. The warning says:
>
> Warning: deprecated with statement usage, Line 7: onresize=MM_reloadPage; }}
>
> Does anyone have a solution?
Looks like the MM code is the same as dreamweaver adds:
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
so maybe something else is causing this problem, can u post a link?
What are you testing it as? XHTMl/Transitional/Strict etc.
Benr
More information about the thelist
mailing list