Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   ASP (http://www.programmingforums.org/forum32.html)
-   -   How can I change .asp page of frame after every 5-10 minutes ? (http://www.programmingforums.org/showthread.php?t=3440)

sham Apr 18th, 2005 11:53 PM

How can I change .asp page of frame after every 5-10 minutes ?
 
How can I change .asp page of frame after every 5-10 minutes ?
I am wondering if there is some way I can change .asp page of a frome after 5-10 minutes thr' scriptiong/coding automatically.
Let me tell you that I am new to ASP.
=Sham

Rory May 1st, 2005 8:25 PM

I'm assuming you mean frames as in an HTML frameset.
That can be done in several ways.
The first and the most widely supported is to specify the Refresh field in the HTTP header. I'm not sure exactly how you'd do this in ASP, but what you're aiming for is to add:
:

Refreh: n; url=http://www.google.com/
after the Content-Type field. (n is in seconds).
The next way is to use the meta equivalent actually in the page source:
:

<meta http-equiv="refresh" content="n;url=http://www.google.com/">
where n is in seconds, and as the name implies it's equivalent.
You could also us javascript, so:
:

<script type="text/javascript">
<!--
function doredirect() {
location.href='http://www.google.com';
}
setTimeout('doredirect();',m);
//-->
</script>

where this time m is in milliseconds (so 1000 = 1 second).
Hope this helps.


All times are GMT -5. The time now is 1:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC