Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-08-2002, 08:14 AM   #1
Member (7 bit)
 
chris1977uk's Avatar
 
Join Date: Sep 2002
Location: Middlesbrough, UK
Posts: 108
Timing web pages

What i need to be able to do in ASP or poss javascript, is close a popup window automatically after 10 mins.

any ideas?
chris1977uk is offline   Reply With Quote
Old 10-08-2002, 08:43 AM   #2
aym
Registered User
 
aym's Avatar
 
Join Date: Nov 2001
Posts: 1,965
Can be done in JavaScript.
In your popup's source code:
PHP Code:
<body OnLoad="setTimeout('self.close()', 600000);"
The second argument of "setTimeout" specifies the amount of time (milliseconds) before executing the first argument.
HTH
aym is offline   Reply With Quote
Old 10-08-2002, 09:02 AM   #3
Member (7 bit)
 
chris1977uk's Avatar
 
Join Date: Sep 2002
Location: Middlesbrough, UK
Posts: 108
this works but the window gives that message "the window is trying to close" then a yes or no.

can i either force it to close, or redirect to another page after 10 mins?
chris1977uk is offline   Reply With Quote
Old 10-09-2002, 04:51 PM   #4
aym
Registered User
 
aym's Avatar
 
Join Date: Nov 2001
Posts: 1,965
You won't get this message if you use this piece of code in a popup, this message shows up only if a script tries to close a main window.
As for redirecting, use the piece of code in the attachment (for some reason, it's not showing up properly on the forum).

Last edited by aym; 10-09-2002 at 04:59 PM.
aym is offline   Reply With Quote
Old 10-09-2002, 05:02 PM   #5
aym
Registered User
 
aym's Avatar
 
Join Date: Nov 2001
Posts: 1,965
(I couldn't attach after posting)
Attached Files
File Type: txt code.txt (82 Bytes, 60 views)
aym is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:24 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2