Refreshing page at onResize event: problem with Firefox

H

hannibal

Hi,
i need to refresh page cathcing "onResize" event.
I wrote this code:

<body onResize="javascript:winodw.location.reload(true); return
true;">

On I.E. it works, but it doesn't work on Firefox.

Someone knows why?

Thanks in advantage!
 
A

ASM

hannibal said:
Really interesting! But... Does thist mean that is impossibile to do
something when users resize browser's windows?

1) leave me resizing my windows as I want, thanks

2) <body onresize="alert('resize')"> works with my FF
 
H

hannibal

1) leave me resizing my windows as I want, thanks
:)

2) <body onresize="alert('resize')"> works with my FF

I solve my problem with:
<body onResize="location.href=location.href">

Thanks all!

Bye
 
J

Jim Davis

hannibal said:
Really interesting! But... Does thist mean that is impossibile to do
something when users resize browser's windows?

Not at all - but IE and FireFox behave differently.

In IE the resize event is thrown continuously as you resize (each "pixel
move" throws the event). In FireFox the event is thrown only after the
action is completed.

In complex applications I generally create a "setLayout()" function that
defines the elements of the application based on the current window size.
This function is then run onResize to manage the layout.

It tends to work fine in both browsers but IE's implementation is smoother
as the event is throw and the elements resize during the operation. In
Firefox the elements aren't resized until the operation is complete (until
the user releases the resize control).

Again - both work, they just work (slightly) differently.

Jim Davis
 
A

ASM

hannibal said:
I solve my problem with:
<body onResize="location.href=location.href">

that solve anything with IE
because on first pixel added the page will refresh
what about 50 pixels ?

so I can't change size without at least a timer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top