I have this script that needs to wait 2 min. & 4 secs. before redirecting
what does the number 5 go to?HTML Code:<html> <title>Redirect</title> <body onload=setTimeout("location.href='http://www.domian.com'",5) bgcolor="#FFFFFF"> </body> </html>
I have this script that needs to wait 2 min. & 4 secs. before redirecting
what does the number 5 go to?HTML Code:<html> <title>Redirect</title> <body onload=setTimeout("location.href='http://www.domian.com'",5) bgcolor="#FFFFFF"> </body> </html>
It causes the script to wait five milliseconds (0.005 of a second) before redirecting.
You should really use a meta refresh here, if you must use anything.
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Redirect</title> <meta http-equiv="refresh" content="124;url=http://www.domian.com"> </head> <body onload="window.setTimeout(function(){location.href='http://www.domian.com';}, 1000 * (60 * 2 + 4)) style="background-color:white;color:black;"> <p> Sorry, you should have been redirected to <a href="http://www.domian.com">http://www.domian.com</a>. </p> </body> </html>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Ok mypage is not doing that. I'm trying to beat the flash before it redirects. Sugg.
The first time I saw "thekristo" I thought it was pretty cool... Still do actually! I wouldn't have it running non-stop though. Kinda gets to much the second/third time around.![]()
"Only dead fish flow with the stream".
- Unknown
Ok well I still can have it redirect to another page, just need help.
Oh...
2min and 4sec...
Ooops... My BadHTML Code:<html> <head> <title>Redirect</title> <script> function redirect(url,min,sec) { setTimeout("window.location = url",min*60*1000+(sec*1000)) } </script> </head> <body onload="redirect('http://www.domain.com',2,4)" bgcolor="#FFFFFF"> Redirecting... </body> </html>
Deleted the last post
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
somethings wrong doesn't work.
Twey posted this:
<meta http-equiv="refresh" content="124;url=http://www.domian.com">
Put that in the head section, with whatever else you want on the page. That will do it.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
So I changed 124 to 10 to test, that is the time right? If it is it dont work Try It.
It redirects to entry.asp from the flash. i would make a page called entry.asp but My webserver wont allow asp.
1. Yes, that's time, in seconds.
2. Nope... not working.
3. in your source, it appears that you might be using xml, with self-closing tags: <link ... />... so... maybe the meta needs to be like <meta ... /> too? Aside from that, looks right. I'm not sure about the /> thing.
4. just change the redirected url, then.
5. If asp isn't allowed, then don't use asp... why are you trying to?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks