473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

onresize and onresizeend

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
2 8078
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bas | last post by:
Hello all, I'm trying to create a little script which will save the width of a certain frame into a database, so that every user still has his/her "own" frame width when logging back on. Now,...
2
by: Aaron Gray | last post by:
OnResizeEnd does not seem to be working on IE 6. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body onResizeEnd="drawAll();">
2
by: David | last post by:
Greetings, Does anyone know of a workaround for the onresize bug in Firefox? <body onresize="history.go(0)"> I've looked all around and can't seem to find a working workaround. David
1
by: Darrel Yurychuk | last post by:
I'm having a problem getting the window.onresize to work properly. Here is a simple test case I wrote: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">...
2
by: Tony | last post by:
If I want to call a function (call it doResize) when the browser window is resized, is it better to put that in the body tag: <body onresize="doResize()"> Or is it better to put the call in a...
2
by: FrankIsHere | last post by:
This should attach the event to the onresize of the window object, but when I try to resize the browser after executing the page it does not work... only after I refresh the page. But then of...
8
by: David Gravereaux | last post by:
Hi, I'm using chunked transfer-coding to send an "unending" page, but IE _NEVER_ fires onresize events until the page is finished. Unfortunately, the page never is "finished". How do I handle...
2
by: yb | last post by:
I am attempting to modify the style of an element (its width) as the window is being resized, in firefox. Long story short, I've tried to use CSS but one particular part of the layout just won't...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.