Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timed POP-UP Window

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Hello fellas.
I was wondering if this is even posible. I have a linked image that when clicked it displays a 300x300 window. I would like this window to only display for 15 seconds or so, how is this done, if possible. Thanks in advance.


<a href=&quot;javascript:popUpWindow(1);&quot;><img border=&quot;0&quot; src=&quot;images/globe.jpg&quot; align=&quot;left&quot;></a>

<script language=javascript>
function popUpWindow(value){
urlString = 'file:///L:/forms'
window.open(urlString,'newwindow','height=300,width=300');
}
</script></td>

QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Hi,

I think something like this would help:

<script language=javascript>
function popUpWindow(value)
{
urlString = 'file:///L:/forms'
window.open(urlString,'newwindow','height=300,width=300');
}

function closeWindow()
{
newwindow.close();
}

setTimeout(&quot;closeWindow()&quot;,15000);
</script>

Good luck

Dmitriy
dbrom@crosswinds.net
 
I have a question re: the above...
What if the windows are being opened in another frame...can you put that script in a different frame and have it still close the windows. If not, is there a way to close all &quot;child&quot; windows at once...

for example...I use for a pointer to my ip address, but start.at puts in their own pop up windows which can get very annoying. So I am trying to create a script that will close those windows as soon as they open when someone comes to my site.
-Ovatvvon
 
I will try it first thing Monday morning dbrom, tyvm QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
dbrom, it giving me an error (in green below)
It seems that when I give it the &quot;NewWindow&quot; reference it does not take it.


<script language=javascript>
function popUpWindow(value)
{
urlString = 'file:///L:/forms'
window.open(urlString,'newwindow','height=300,width=300');
}

function closeWindow()
{
newwindow.close();
}

setTimeout(&quot;closeWindow()&quot;,15000);
</script>
QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
. QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top