By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,165 Members | 1,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,165 IT Pros & Developers. It's quick & easy.

Why onResize fires 3 times when I re-size the window?

P: n/a
df
Why?

May 17 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a
df wrote on 18 mei 2006 in comp.lang.javascript:
Why?


Why not?

Afer all resizing can be a lenghty buziness.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 17 '06 #2

P: n/a
df
Not understand very much.Would you mind telling more details?

May 17 '06 #3

P: n/a
On 17 May 2006 15:01:07 -0700, "df" <df****@msn.com> wrote:
Why onResize fires 3 times when I re-size the window?


because it fires as you're resizing it, and not just at the end of the
resize, why would you expect it to only fire at the end?

Jim.
May 17 '06 #4

P: n/a
Jim Ley wrote :
On 17 May 2006 15:01:07 -0700, "df" <df****@msn.com> wrote:
Why onResize fires 3 times when I re-size the window?


because it fires as you're resizing it, and not just at the end of the
resize, why would you expect it to only fire at the end?

Jim.

IE 6+ will fire the resize event continuously. Opera 8+ also.

Firefox, Mozilla Seamonkey, Mozilla Suite will not.

Bug 114649: onresize events should fire while resizing the window, not
just when the mouse stops moving
https://bugzilla.mozilla.org/show_bug.cgi?id=114649

Grard
--
remove blah to email me
May 18 '06 #5

P: n/a
Jim Ley wrote :
On 17 May 2006 15:01:07 -0700, "df" <df****@msn.com> wrote:
Why onResize fires 3 times when I re-size the window?


because it fires as you're resizing it, and not just at the end of the
resize, why would you expect it to only fire at the end?

Jim.

IE 6+ will fire the resize event continuously. Opera 8+ also.

Firefox, Mozilla Seamonkey, Mozilla Suite will not.

Bug 114649: onresize events should fire while resizing the window, not
just when the mouse stops moving
https://bugzilla.mozilla.org/show_bug.cgi?id=114649

Grard
--
remove blah to email me
May 18 '06 #6

P: n/a
On Wed, 17 May 2006 19:56:42 -0400, =?ISO-8859-1?Q?G=E9rard_Talbot?=
<ne***********@gtalbot.org> wrote:
Jim Ley wrote :
On 17 May 2006 15:01:07 -0700, "df" <df****@msn.com> wrote:
Why onResize fires 3 times when I re-size the window?


because it fires as you're resizing it, and not just at the end of the
resize, why would you expect it to only fire at the end?

Jim.

IE 6+ will fire the resize event continuously. Opera 8+ also.


On windows both of these depend on the OS setting show window contents
whilst dragging.

Jim.
May 18 '06 #7

P: n/a
df wrote on 18 mei 2006 in comp.lang.javascript:
Not understand very much.Would you mind telling more details?


Would you mind where you are talking about?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.
<http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 18 '06 #8

P: n/a
df
Evertjan. 写道:
df wrote on 18 mei 2006 in comp.lang.javascript:
Not understand very much.Would you mind telling more details?
Would you mind where you are talking about?
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.


Roger~
And now,Am I OK this time?

May 18 '06 #9

P: n/a
df
Well,dear guys,I just want append a function to run only *one* time
after the OnResize event is finished.How can I?

Jim Ley 写道:
On Wed, 17 May 2006 19:56:42 -0400, =?ISO-8859-1?Q?G=E9rard_Talbot?=
<ne***********@gtalbot.org> wrote:
Jim Ley wrote :
On 17 May 2006 15:01:07 -0700, "df" <df****@msn.com> wrote:

Why onResize fires 3 times when I re-size the window?

because it fires as you're resizing it, and not just at the end of the
resize, why would you expect it to only fire at the end?

Jim.

IE 6+ will fire the resize event continuously. Opera 8+ also.


On windows both of these depend on the OS setting show window contents
whilst dragging


May 18 '06 #10

P: n/a
df wrote on 18 mei 2006 in comp.lang.javascript:
Evertjan. 写道:
df wrote on 18 mei 2006 in comp.lang.javascript:
> Not understand very much.Would you mind telling more details?

Would you mind where you are talking about?
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of
the article headers.


Roger~
And now,Am I OK this time?


Roger roger, Roger.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 18 '06 #11

P: n/a
On 18 May 2006 04:55:48 -0700, "df" <df****@msn.com> wrote:
Well,dear guys,I just want append a function to run only *one* time
after the OnResize event is finished.How can I?

var globalWindowResizeTimer=0

window.onresize=function() {
clearTimeout(globalWindowResizeTimer);
globalWindowResizeTimer=setTimeout(whateverYouWant ,150);
}

The normal event culling method.

Jim.
May 18 '06 #12

P: n/a
df said the following on 5/18/2006 7:55 AM:
Well,dear guys,I just want append a function to run only *one* time
after the OnResize event is finished.How can I?


<URL:
http://msdn.microsoft.com/library/de...resizeend.asp?

"There is no public standard that applies to this event"

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 18 '06 #13

P: n/a
df
onresizeend Event doesn't work on IE 6(seems only on IE 5.5)

Well,this seems a old prolem,let's ignore this thing.Thk u,all friends.
;-)

http://groups.google.com/group/comp....6e76ef355d9059

Randy Webb 写道:
df said the following on 5/18/2006 7:55 AM:
Well,dear guys,I just want append a function to run only *one* time
after the OnResize event is finished.How can I?


<URL:
http://msdn.microsoft.com/library/de...resizeend.asp?

"There is no public standard that applies to this event"


May 18 '06 #14

P: n/a
Jim Ley wrote:
On 18 May 2006 04:55:48 -0700, "df" <df****@msn.com> wrote:
Well,dear guys,I just want append a function to run only *one* time
after the OnResize event is finished.How can I?
var globalWindowResizeTimer=0


Initializing a timer variable with 0 is by no means a way ...
window.onresize=function() {
clearTimeout(globalWindowResizeTimer);
.... to prevent this from failing or producing undesired side effects.
Instead, the variable should be initialized with a value that is
unlikely to be returned by window.setTimeout(), such as `null', and
_window_.clearTimeout() should only be called iff

1. window.clearTimeout() is available as a method. It appears
safe to assume that if window.setTimeout() is supported,
window.clearTimeout() is supported as well.

2. The argument value is different from the initial value.
globalWindowResizeTimer=setTimeout(whateverYouWant ,150);
_window_.setTimeout() should only be called iff that method is supported.
}

The normal event culling method.


For suitable values of "normal".
PointedEars
--
This above all: To thine own self be true.
-- William Shakespeare (1564-1616)
May 23 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.