| Author |
Message |
camner
Joined: 05 Jun 2003 Posts: 21
|
Posted: Sun Jun 15, 2003 12:37 am Post subject: Netscape Navigator 4 resize problem |
|
|
There is a well-known problem with Netscape Navigator 4.x: when a window is resized, all hell breaks loose (layers are not placed correctly). There are many javascript workarounds around the Net. They all involve having javascript reload the page when a netscape 4.x window is resized.
After installing cooljsmenus, my page no longer reloads when resized in NN 4.x.
I looked at the coolmenus.js file, and I see that it has a resize handler in it (which explains why the resize handler used by Dreamweaver doesn't get called anymore!), but nevertheless, the page doesn't reload in NN 4.x.
Any thoughts?
Thank you. |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Sun Jun 15, 2003 7:29 am Post subject: |
|
|
If your onresize handler will always reload window, then you can find the following line in the coolmenu.js and comment it out with '//':
if (bw.ns4) window.onresize=resizeHandler;
Let me know if you need some wiser solution. |
|
| Back to top |
|
 |
camner
Joined: 05 Jun 2003 Posts: 21
|
Posted: Sun Jun 15, 2003 4:16 pm Post subject: |
|
|
It doesn't ALWAYS reload (see below), but always does when it needs to. It seems that yours doesn't reload when it needs to (try http://www.charleswright.org in NS 4 and resize!). I'm happy to use your code, but it doesn't seem to resize my page when it needs to.
I was using DreamWeaver's code which seems to resize only when "innerWidth" or "innerHeight" change:
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); |
|
| Back to top |
|
 |
camner
Joined: 05 Jun 2003 Posts: 21
|
Posted: Sun Jun 15, 2003 9:59 pm Post subject: |
|
|
OK, further exploration turns up something puzzling. If I delete all references to cooljsmenu (by removing the 3 lines that reference it--coolmenus.js, menuitems.js, and the function call), the window reloads on resize, as expected, using Dreamweaver's onresize handler. If I include the 3 cooljsmenu references, the window does NOT reload, even after commenting out the line you suggested in your earlier reply.
I know this doesn't make much sense, but that's what it does. I took the precaution of deleting NS cache files and rebooting the computer, just in case...
Any other thoughts? |
|
| Back to top |
|
 |
|