Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting position change in IE6 (window.onmove equivalent)

23 views
Skip to first unread message

Csaba Gabor

unread,
Mar 14, 2009, 4:42:32 AM3/14/09
to
I can detect when IE's size has changed via window.onresize
But what is the most reasonable way to detect when
IE's position has changed? Ie. when I click on the title bar
and drag OR when I click on the left or top border and drag.
I can always do a window.setInterval and check ie.Left
and ie.Top, but setInterval is so not cool for these kinds of
situations.

Thanks,
Csaba Gabor from Vienna

Some things that don't work are:
window.onmove = ...
and
<body onmove="alert('Hi mom')">

And also, this vbscript script doesn't work:

Set ie=WScript.CreateObject("InternetExplorer.Application", "evt_")
ie.visible = true
ie.Navigate2 "about:blank"
Set window = ie.document.parentWindow
window.opener = "Me" 'so ie.Quit will work
window.execScript "window.doneP=false" 'quit signaling
window.execScript "document.onkeypress=function(){" & _
"if(window.event.keyCode==27) " & _
"window.doneP=true; }"

'This section is for gracefully ending both ie AND vbscript
On error Resume Next
Do While (True)
If (window.doneP=true) Then
Exit Do
End If
WScript.Sleep 10
Loop
ie.Quit
MsgBox "Done"

Function evt_WindowSetLeft(leftVal)
'This does not fire, presumably since IE is not
'being hosted in anything
MsgBox "WindowSetLeft fired"
End Function

Function ieevt_onQuit()
'This is only to show that event handlers are properly hooked
MsgBox "onQuit fired"
End Function

0 new messages