Click to See Complete Forum and Search --> : netscape resize fix script problem


kelly002
12-15-2002, 01:43 PM
After many attemps to use the Dreamweaver netscape resize fix script, I found out that that script didn't work properly if the page contains embedded .swf files. Instead I found this script that works great except when you try to resize the page to a smaller window than the actual page's design. In that case the reload process gets looped and it just reloads, reloads and reloads...

Does any javascript guru see what I could do to this script to prevent that? thanks for reading this...


<script language="JavaScript">
<!--
function P7_N4FlashFix(a) { //1.1 by PVII
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
if(a){document.P7n4_w=innerWidth;document.P7n4_h=innerHeight;setInterval("P7_N4FlashFix(false)",100);
}else if(document.P7n4_w!=innerWidth||document.P7n4_h!=innerHeight){location.reload();}}
}
P7_N4FlashFix(true);
//-->
</script>

khalidali63
12-15-2002, 05:26 PM
I ran the above code in NS4.79 to make sure, it works as intended to and does loop indefinitely,make sure you are not calling P7_N4FlashFix(true); from some where else and setting the value to false....or paste your full lenght code so that I can mimic the exact env...cheers
:-)

Khalid