473,657 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what caused onresize event behavior to change?

Hi!

I have recently realized that some computer in my office have a
different behavior when it comes to handle the onresize event in
Internet explorer. I red a lot on this forum about this but I never was
able to understand what is the cause of the different behavior. That's
what I want to know.

my HTML code:
-----------------
<html>
<head>
</head>
<body onresize="alert ()">
</body>
</html>
-----------------

a very simple code like this generate two very different behavior in
IE.

#1 - Most of the computer will do an alert as soon as I resize the
window for a single pixel.

#2 - the alert occurs at the end of the resizing when I release the
mouse button.
Anybody know what I can modify in my computer to have every copmuter
react as #1 situation??

Hint: I saw this problem on winxp sp2, win2000, win98. IE version
doesn't seems to make a difference. I tried to compare the windows
update... without success!
:(

Thanks for your help!

Jeje

Jul 23 '05 #1
5 5911
VK
It is very strange that it work(ed) for you however whatsoever, because
it shouldn't.

Consider the small test case at the bottom. The comments are following:
1) Firefox fires 'onload' AFTER you ended up with resizing. It has
sense, because not any resize is really resize: what if you returned
the window to the exactly same size as before dragging? Take the resize
event on the capturing phase (while it's going down), and you are sort
of ok. BUT SEE THE POINT 3 !

2) IE 6.0 is badly broken. It generates from 2 up to 4 resize events AT
THE BEGINNING of each drag, depending from what side are you dragging
(it must be correlated to the scrollbars redraw, which causes separate
resize bubbles). Also it fails to set event properties (all undefined),
so you cannot trace bubbles history.

3) A huge lot of things may cause onresize event, including first page
load. So using this method you can easily fail in a dead loop, then one
onresize will cause another etc. etc. You should use real size check:

on init:
self.oldWidth = self.innerWidth
self.oldHeight= ...

and later if self.oldWidth != self.innerWidth etc.
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script>
var isDOM = window.addEvent Listener;
function init() {
if (isDOM) {
self.addEventLi stener('resize' ,test,true);
}
else {
self.attachEven t('onresize',te st);
}
}

function test(e) {
var tmp = '';
if (isDOM) {
alert(e.target) ;
}
else {
for (prop in event) {tmp+=prop+'='+ event.prop+'\n' ;}
alert(tmp);
}
}

window.onload=i nit;
</script>
</head>

<body bgcolor="#FFFFF F">

<p>Text</p>
</body>
</html

Jul 23 '05 #2
On 19 May 2005 14:47:08 -0700, je****@hotmail. com wrote:
a very simple code like this generate two very different behavior in
IE.

#1 - Most of the computer will do an alert as soon as I resize the
window for a single pixel.

#2 - the alert occurs at the end of the resizing when I release the
mouse button.
Anybody know what I can modify in my computer to have every copmuter
react as #1 situation??


change the "show window contents whilst dragging" setting in your
window manager.

Jim.
Jul 23 '05 #3
VK
Just knocked on me:

"event properties for onresize are not set" might be not a bug, but a
security mesure. Otherwise we could bypass frame security model by
using event.srcElemen t.doWhatYouWant ()

Jul 23 '05 #4
Thanks for your help everybody!

VK:
My problem only concern IE 6 + on a window OS because I'm making a
software based on this technology (poor me! :)
My question is not how to go around the problem in an html page, but
what windows update, registry key, or whatever windows settings can be
turn ON/OFF to enabled or disabled this "feature".

Jim Ley:
Thats the kind of answer I was expecting. I hope what you say is true,
Unfortunatly I'm going to have to wait until tuesday to test this.

Here's what I found on this topic:

-------------------------------------------------------------
Showing window contents whilst dragging

This tweak turns on the option to show the full window contents (rather
than just an outline) of a window whilst it is being dragged to a new
position.
To show window contents whilst dragging:

Use a registry editing tool to navigate to the following key:
HKEY_CURRENT_US ER\Control Panel\Desktop
Insert or change a value with the following details:
Data Type: SZ
Value Name: DragFullWindows
Value: 1
Restart the computer for the changes to take effect.
Please note: This functionality is automatically turned off by some
third-party applications
-------------------------------------------------------------
found on:
http://www.sanx.org/tipShow.asp?articleRef=143

Many thanks to everybody, I'm going to confirm soon if that is the
solution!

Jeje

Jul 23 '05 #5
Confirmation!

the solution:

the registry key that turn that feature ON/OFF

HKEY_CURRENT_US ER\Control Panel\Desktop\D ragFullWindows

1=ON (will display the content while the window is moved or resized)
0=OFF(will not)

It seems this feature have an effect on the onresize event of an HTML
page.

Thanks again!

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6992
by: The Plankmeister | last post by:
Hi... Is there a way of preventing the second firing of the onResize event in IE? It's an absolute bast. In the past few weeks I've come to realise how completely and utterly pants IE is. Shame a million percent of people use it. : (
2
9965
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, this works ok, though there's one little problem left: when i click the frameborder and drag it around in IE (it's not working in NN, but that's not my goal since it's a very specific CMS) the onResize handler is called literally hundreds of times.
4
1935
by: Ike | last post by:
Does javascript have on onresize() method? How can you implement that? Is it possible to cause things to repaint when resized? Thanks, Ike
4
2749
by: me54 | last post by:
does anyone know how to call some javascript function when firefox fire the onresize event? something like <body onresize="alert();"> doesn't work on forefox? thnx.
6
24657
by: hannibal | last post by:
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?
9
7506
by: Joe | last post by:
I have a DataGrid with a templated column that displays ImageButtons. I need to know if one of these buttons caused the postback or just another button on the form. If one of these buttons caused the postback than I don't want to do a DataBind otherwise I do. I know __EVENTTARGET doesn't return this information. Is there anything else that does? Thanks, Joe
2
97089
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 script tag in the <head>: <script type="text/javascript"> window.onresize = doResize; </script>
2
2026
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 course that's after the HTTP request. Here is the code: <HTML> <HEAD> <script language="javascript"> function Loadit() { var oHTTP = new ActiveXObject("Microsoft.XMLHTTP");
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.