Forum Moderators: open

Message Too Old, No Replies

Netscape 4.x resize problem

         

vladanik

3:11 am on Mar 22, 2003 (gmt 0)

10+ Year Member



I have a question about the famous NN 4.x resize problem.

I've been doing some searching on the subject and here's what I found out:

1) Resizing of NN 4 sometimes messes up the layout
of the page - this one is OK

2) NN 4.x interprets every page load as a resize - this one is not OK

I tried doing this:

<script language="JavaScript">
<!--
function radi() {
window.location.reload();
}
//-->
</script>

<body onresize="radi()">

If that was true, then this script should have put NN
into endless looping, which didn't happen, neither
in NN 4.03 nor in NN 4.5

3) On this page [webreference.com...]
it said that NN doesn't triger a resize event when it loads
a page, but when it shows scrollbars. I can not find some confirmation or proof,
for that one either.

They even have an example page at [webreference.com...]
but when I tried their examples in both NN 4.03 and NN 4.5
they didn't work like they said it would. NNs didn't triger
an onresize event when they showed the scrollbars.

Does NN 4.x really triger a resize event when it loads a page or
does it trigger a resize event when it shows scrollbars?
If it's the first case, is there something wrong with my script above?
Why doesn't it work on my machine?

Are the examples on the webreference pages working to you
like they're supposed to, are they trigering the resize event
when the scrollbars are shown?

Could someone please help me with this. I'm desperate. I'm even starting
to think there is no NN 4.x bug :))

tedster

5:55 am on Mar 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a complex bug, and it's also not present in every version of Netscape 4. I've seen recommendations for the approach you've taken, but it's not dependable in all situations.

As far as I know, the best way to fix the resize bug is this: early on in the page, assign each of innerWidth and innerHeight to a variable.

Then, in the body tag, use the onResize [note - capital "R"] event handler to call a function that first compares the current innerWidth and innerHeight to the variables you stored during the original page load. Only reload if there really is a difference.

vladanik

1:54 pm on Mar 22, 2003 (gmt 0)

10+ Year Member



Thanks tedster, but I already know that solution. What I would like to know is if NN 4 interprets a page load as a resize, or perhaps it interprets showing of the scrollbars as a resize. And what's wrong with those examples on webreference.com? They are a reputable site and I can't believe that those examples are totaly wrong.

tedster

3:54 pm on Mar 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Last year I did a test for this by triggering an alert box, and I'm pretty sure it really was scrollbars, as they say on WebReference.

But when I rebuilt this machine, I only installed NN 4.8, which doesn't have the bug, so I can't repeat the test without DL'ing another browser.

Is your question practical or informational - that is, do you have a specific page you need to get working?

vladanik

6:02 pm on Mar 22, 2003 (gmt 0)

10+ Year Member



Last year I did a test for this by triggering an alert box, and I'm pretty sure it really was scrollbars, as they say on WebReference.

In that case, it must be that both of my browsers (NN 4.03 and NN 4.5) don't have that bug. Do you perhaps know which versions have the bug, and which don't?

Is your question practical or informational - that is, do you have a specific page you need to get working?

It's strictly informational. I bumped into the webreference page, and when I tried to check the bug on my own (I also made an alert box), there were no problems, that is, showing of the scrollbars didn't trigger the resize event. Now I'm obsessed with it. I'll probably download another version of NN tonight and try it. What was the version
you had last year, when you did the checking? Maybe I could download that one.