HTML Timed Redirect

  • edward
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 29, 2004
  • Posts: 7
  • Status: Offline

Post March 26th, 2004, 2:15 pm

Could anyone assist me with a little html help?

I would like to build 3 or 4 pages that will automatically redirect after 1 or 2 seconds. Each page will have an image and it will flash an image for 1 or 2 secs then redirect you to another page with another image, etc.

It could probably be done with a simple tag. Or is there a better way to do it (ie flash)?

almost like a photo slideshow with one image per page.

Thanks in advance,
ed
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 26th, 2004, 2:15 pm

  • Nunzio390
  • Student
  • Student
  • User avatar
  • Joined: Mar 22, 2004
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)
  • Status: Offline

Post March 26th, 2004, 3:05 pm

Include this code within your <head></head> tags...

<meta http-equiv="refresh" content="5; url=next_page.html">

The content value above denotes how many seconds the page stays opened before redirecting to another page. The url indicated above will need to have the name changed from next_page.html to whatever page you want to redirect to after a certain amount of seconds have elapsed.

Change the content=5 above to any other value for how many seconds you want the page to continue displaying your image (or whatever).

I use the same technique within my Automated Jukebox at my site, where I allow songs to completely play before auto-advancing to the next song.

Example: the first song (Wasted On The Way) will play for 170 seconds (full song length) before advancing to the second song page...

<meta http-equiv="refresh" content="170; url=song2.html#2">
  • edward
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 29, 2004
  • Posts: 7
  • Status: Offline

Post March 26th, 2004, 3:28 pm

Works like a charm :D

It's always the simplest things :oops:


Thank you very much, for your help and thorough documentation!!!!!!

ed
  • Nunzio390
  • Student
  • Student
  • User avatar
  • Joined: Mar 22, 2004
  • Posts: 70
  • Loc: Tharsis Ridge (Martian lowlands)
  • Status: Offline

Post March 26th, 2004, 3:31 pm

Yer welcome Image Image
  • Mr_Hill
  • Born
  • Born
  • No Avatar
  • Joined: Oct 31, 2006
  • Posts: 2
  • Status: Offline

Post October 31st, 2006, 6:42 am

hey i just stumbled across this on a google search! Really helped me get what i want... but to make it harder......i want the timed opening, however i want it to open in a new window....rather than the main frame. I tried using the target = "_blank" at different parts of the meta code thingy....

any ideas? :D PLEASE!
  • STeeLRaT
  • Graduate
  • Graduate
  • User avatar
  • Joined: Mar 17, 2006
  • Posts: 183
  • Loc: somewhere
  • Status: Offline

Post October 31st, 2006, 7:14 am

I don't think this is possible, Mr_Hill.

EDIT: people will think it's an ad
http://www.hellcoam.com
  • littlephoenix
  • Graduate
  • Graduate
  • User avatar
  • Joined: Oct 31, 2006
  • Posts: 149
  • Status: Offline

Post November 1st, 2006, 4:52 am

here is one with java rather than meta tags

<script type="text/JavaScript">
<!--
setTimeout("location.href = 'http://www.yourURL.com';",1500);
-->
</script>
  • STeeLRaT
  • Graduate
  • Graduate
  • User avatar
  • Joined: Mar 17, 2006
  • Posts: 183
  • Loc: somewhere
  • Status: Offline

Post November 1st, 2006, 5:25 am

littlephoenix wrote:
here is one with java rather than meta tags

<script type="text/JavaScript">
<!--
setTimeout("location.href = 'http://www.yourURL.com';",1500);
-->
</script>

Does this script open a new browser? Eviilllll
http://www.hellcoam.com
  • Grey
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 02, 2006
  • Posts: 34
  • Status: Offline

Post November 1st, 2006, 10:09 am

Quote:
Does this script open a new browser? Eviilllll
Any decent popup blocker will prevent that script from working.
  • Mr_Hill
  • Born
  • Born
  • No Avatar
  • Joined: Oct 31, 2006
  • Posts: 2
  • Status: Offline

Post November 6th, 2006, 3:08 am

Hmm i guess your right, although im a little disappointed. However i am at no loss, i will just create it as a link to open as a new window... i was just trying to be fancy ;)


Well thanks for you help folks, really appreciated it :D
  • howtogetrich
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Apr 25, 2007
  • Posts: 37
  • Status: Offline

Post April 26th, 2007, 11:42 pm

i would stay away from java, browsers dont like that stuff, it will block your link and ppl wont see your content,
  • deathblade
  • Proficient
  • Proficient
  • User avatar
  • Joined: Mar 08, 2007
  • Posts: 419
  • Loc: u.k
  • Status: Offline

Post April 27th, 2007, 2:06 am

mr_hill i think i got what you want


Code: [ Select ]
<script language="JavaScript" type="text/javascript">
setTimeout("window.open('http://www.youpage.com/page.html');", 1000);
</script>
  1. <script language="JavaScript" type="text/javascript">
  2. setTimeout("window.open('http://www.youpage.com/page.html');", 1000);
  3. </script>



1000 = 1 sec

this makes http://www.youpage.com/page.html open in a new window after 1 sec

i tried it and it worked but it must have the full url for it too work

and to Grey

you could put a notice on the site asking people to disable there pop up blocker?
This is a block of text that can be added to posts you make. There is a 500 character limit.

Post Information

  • Total Posts in this topic: 12 posts
  • Users browsing this forum: No registered users and 227 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.