UnDeaD Posted April 17, 2006 Share Posted April 17, 2006 Hi, I need a script that will redirect someone to a page without an anchor or header or meta.What I DON'T want: <?php header(Location: ...) ?><html>...or<html><head><meta http-equiv="Refresh" content="1;..." /></head>...or<html><head><script ...></head>... What I DO want: <html><body><?php (code for redirect ?></body>...or<html><body><script type="text/javascript">(code for redirection)</script></body>... Link to comment Share on other sites More sharing options...
pulpfiction Posted April 17, 2006 Share Posted April 17, 2006 Hi,Javascript code to redirect would be like this,function red(){window.location = "http://www.google.com/"}You'>http://www.google.com/"}You can use this function for any event, like <body onload="red();">This will redirect to the new page(google), when the original page loads..<body> <script type="text/javascript"> window.location = "http://www.google.com/" </script></body> Link to comment Share on other sites More sharing options...
UnDeaD Posted April 17, 2006 Author Share Posted April 17, 2006 Thanks, would that work if I say did this:window.location = "file.php"? Link to comment Share on other sites More sharing options...
pulpfiction Posted April 17, 2006 Share Posted April 17, 2006 Hi UnDeaD,Yes it will work.. Link to comment Share on other sites More sharing options...
UnDeaD Posted April 17, 2006 Author Share Posted April 17, 2006 Thanks, don't really use JavaScript that much, in fact, not at all... lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now