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

.close not working when window is being moved

P: n/a
I have a small window open that should close after 60 secs...works
fine if the user is not playing with the window. The problem occurs
when the user is moving the window around when the 60 secs is up...I
just hear a 'beep' and the window does not close until the user moves
on to the next page of the tutorial/site. Any insight?

Thanks,
Christine
function Start(page) {
if (!OpenWin){
window.status="";
OpenWin = this.open(page, "CheatSheet",
"toolbar=no,menubar=no,location=no,scrollbars=no,r esize=yes,status=no,width=500,height=270");
self.setTimeout('winClose()', 60000)}
else
OpenWin.focus();
}

function winClose() {
OpenWin.close();
OpenWin=null;
window.status="";
}
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Christine <wi*********@yahoo.com> wrote in message
news:26*************************@posting.google.co m...
I have a small window open that should close after 60 secs...works
fine if the user is not playing with the window. The problem occurs
when the user is moving the window around when the 60 secs is up...I
just hear a 'beep' and the window does not close until the user moves
on to the next page of the tutorial/site. Any insight?

Thanks,
Christine
function Start(page) {
if (!OpenWin){
window.status="";
OpenWin = this.open(page, "CheatSheet",
"toolbar=no,menubar=no,location=no,scrollbars=no,r esize=yes,status=no,width=
500,height=270"); self.setTimeout('winClose()', 60000)}
else
OpenWin.focus();
}

function winClose() {
OpenWin.close();
OpenWin=null;
window.status="";
}


Hi,
novice tester observes that with the necessary
var OpenWin;
in the script section, and using IE6,
the functionality performed as expected
1) when Start("index.htm"); was called in the script section
2) when onload was used to call Start as part of the body tag.
Didn't seen to matter if the new window had focus or not, was moving or
not....

More details might help ?! (browser, other functionality...)

Chris

Jul 20 '05 #2

P: n/a
Hi Chris,
Just to clarify - I'm gathering that you tested the code I
posted...the problem isn't a matter of where the 'focus' is per se.
If the user is actively moving the small window (mouse button
depressed while on the new window), this is when the problem occurs.
I'm encountering this problem in IE 6, and the script is called when
the user clicks on a link that appears in the parent window.

Thanks,
Christine

"Chris Crandell" <cc******@ix.netcom.com> wrote in message news:<O8*****************@newsread1.news.pas.earth link.net>...
Christine <wi*********@yahoo.com> wrote in message
news:26*************************@posting.google.co m...
I have a small window open that should close after 60 secs...works
fine if the user is not playing with the window. The problem occurs
when the user is moving the window around when the 60 secs is up...I
just hear a 'beep' and the window does not close until the user moves
on to the next page of the tutorial/site. Any insight?

Thanks,
Christine
function Start(page) {
if (!OpenWin){
window.status="";
OpenWin = this.open(page, "CheatSheet",

"toolbar=no,menubar=no,location=no,scrollbars=no,r esize=yes,status=no,width=
500,height=270");
self.setTimeout('winClose()', 60000)}
else
OpenWin.focus();
}

function winClose() {
OpenWin.close();
OpenWin=null;
window.status="";
}


Hi,
novice tester observes that with the necessary
var OpenWin;
in the script section, and using IE6,
the functionality performed as expected
1) when Start("index.htm"); was called in the script section
2) when onload was used to call Start as part of the body tag.
Didn't seen to matter if the new window had focus or not, was moving or
not....

More details might help ?! (browser, other functionality...)

Chris

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.