Here's my try <html <head> <title>Untitled Document</title> </head> <body onLoad="setTimeout(location.href='http://www.tvaddicts.tv', '3000')"> <p>Redirecting to www.tvaddicts.tv Please Wait ....</p> </body> </html> 3000 is a time in milliseconds
using setTimeout and window.location, like so : <html> <head> <script language="javascript"> function CountDown( ) { var current = document.getElementById('CountDown').innerHTML; var next = current - 1; document.getElementById('CountDown').innerHTML = next ; if( next == 0 ) { window.location.href = 'http://google.com'; } setTimeout( "CountDown()", 1000 ); } </script> </head> <body onload="CountDown( );"> Redirecting in <span id="CountDown">5</span> </body> <html> HTML:
Actually i am making one login form. On submitting valid user name and password i should be redirected to welcome page otherwise it should goto page containing error message. I have put the validation using javascript for checking the fields whether they are blank or not. but i am not able to redirect the page. How to do it? I want to redirect the page to CGI script. Please help me. Thanks in advance.
If it's a login form, then that form needs to be submitted for the user to be validated I would imagine, otherwise how do you check they have a valid username / password ? If you post the code you have currently things might be a little clearer for us.