HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 12th, 2000, 03:15 PM
dave981 dave981 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Minneapolis, MN
Posts: 48 dave981 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 53 sec
Reputation Power: 9
Send a message via ICQ to dave981
I have a window pop-up system that a user can browse different options, and when they click on an Item it will open up in a bigger window. What I would like to do is set a timer in the window so that if a client doesn't do anything for 10 seconds the pop-up automatically disapear.
is there a way to do it using a Meta refresh command?
I'm not trying to do anything complicated... Basically all it is: "If page open 10 seconds, then close popup" - the code would be in the pop-up window, preferably...

thanks for your help,
Dave

Reply With Quote
  #2  
Old July 12th, 2000, 07:15 PM
sophisticate sophisticate is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Spokane, Wa. US
Posts: 3 sophisticate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, I'm not sure about doing this through straight meta tags because you would want the page to stay up if you capture an event. With javascript, however, it's not that difficult. Note: I am simply a javascript dabbler, and the following code may not be the most efficient way of doing it, and I really doubt it's cross-browser. Oh well.. it gives an idea.

<script language='javascript'>
var t;
function doLoad() {
t = setTimeout("window.close()",10000);
}
function clockStop() {
clearTimeout(t);
}
</script>
<body onLoad='doLoad()' onClick='clockStop()'>

And that seems to work. URL

Brendan Cassida http://www.witheredpipedream.com

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by dave981:
I have a window pop-up system that a user can browse different options, and when they click on an Item it will open up in a bigger window. What I would like to do is set a timer in the window so that if a client doesn't do anything for 10 seconds the pop-up automatically disapear.
is there a way to do it using a Meta refresh command?
I'm not trying to do anything complicated... Basically all it is: "If page open 10 seconds, then close popup" - the code would be in the pop-up window, preferably...

thanks for your help,
Dave
[/quote]


Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Pop-up Window - Timed Auto Close


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway