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

onresize and onresizeend

P: n/a
In IE, I'm having problems with these events. What I'm trying to do is
get the size of
the window after the user has resized it, either by dragging the corner
or by maximizing.

It seems like in IE if the window has a handler for onresize, and the
user clicks
to maximize the window, the handler gets called BEFORE the window is
maximized.
So the size is the size before maximizing, rather than after. (In
Firefox the event
handler gets called AFTER the window is maximized, which is what I
want.)

It seems like in IE this line
window.attachEvent("onresizeend", function() { alert("resize end"); }
);
has no effect at all, even though the Microsoft doc says it should
work.

I would like to get an event that tells me the size of a window after
it has been resized,
in IE 6. Does anybody know how to do it? THanks.

Feb 3 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> It seems like in IE this line
window.attachEvent("onresizeend", function() { alert("resize end"); }
);


If your window does not contain frames it may helps:

<HTML>
<HEAD>
<script language=javascript>
window.attachEvent("onresize", function() {
alert("Width="+document.body.offsetWidth+"
Height="+document.body.offsetHeight); });
</script>
</HEAD>
<BODY>
</BODY>
</HTML>

onresizeend - fires when the user finishes changing the dimensions of
the content editable object in a control selection, it has no relation
to resizing window itself.

Sorry for my English

Feb 3 '06 #2

P: n/a
mitch wrote:
In IE, I'm having problems with these events. What I'm trying to do is
get the size of
the window after the user has resized it, either by dragging the corner
or by maximizing.

It seems like in IE if the window has a handler for onresize, and the
user clicks
to maximize the window, the handler gets called BEFORE the window is
maximized.
So the size is the size before maximizing, rather than after. (In
Firefox the event
handler gets called AFTER the window is maximized, which is what I
want.)

It seems like in IE this line
window.attachEvent("onresizeend", function() { alert("resize end"); }
);
has no effect at all, even though the Microsoft doc says it should
work.


It seems onresizeend and onresizestart do not work in IE. Here's a
reference:

<URL:http://www.blooberry.com/indexdot/html/tagpages/attributes/events.htm>
--
Rob
Feb 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.