How to Open a new webpage in new window after 10 seconds in php?

mymindrules27

Newbie
Joined
Jul 10, 2010
Messages
45
Reaction score
2
How to Open a new webpage in new window after 10 seconds in php?

It is like if i am browsing hxxp://xyz.com , then after 10 seconds a new window open with the url http://abc.com automatically

Any idea?
 
How to Open a new webpage in new window after 10 seconds in php?

It is like if i am browsing hxxp://xyz.com , then after 10 seconds a new window open with the url hxxp://abc.com automatically

Any idea?

Will require java script to be enabled.

<html>
<head>
<script type="text/javascript">
function delayer(){
window.location = "hxxp://www.website.ext"
}
</script>
</head>
<body onLoad="setTimeout('delayer()', 10000)">
Redirecting in 10 seconds.
</body>
</html>
 
Will require java script to be enabled.

<html>
<head>
<script type="text/javascript">
function delayer(){
window.location = "hxxp://www.website.ext"
}
</script>
</head>
<body onLoad="setTimeout('delayer()', 10000)">
Redirecting in 10 seconds.
</body>
</html>

Will it open in new window?
What i want is that hxxp://xyz.com should not be closed and after 10 seconds a new window open with the url hxxp://abc.com automatically without closing the hxxp://xyz.com .
 
I have tried:

<script>
window.open("hxxp://abc.com", "_blank", "");
</script>

It is opening in new window but it is blocking as a pop up .
I dont want in this way , please suggest.

Thanks
 
Warning :) .. I'm not a PHP-coder.
Coming from Perl I now try to learn a bit PHP.

Haven't tried, but I think it should work this way:

PHP:
<?php







    // Send HTTP-Status for Document to Client







    header ("HTTP/1.0 404 Not Found");







    // Send Refresh-Header with Timeout and New URL to Client







    header ("Refresh: 10; url=http://yourdomain.com/");















    // Followed by your HTML-Content:







?>







<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"







       "http://www.w3.org/TR/html4/loose.dtd">







<html>







    <head>







        <title>Your Title here!</title>







    </head>







    <body>







        <h1>Nice Big Headline</h1>







        <p>







            You will be redirected in 10 sec.







            If not, please click <a href="http://yourdomain.com/" title="">here</a>.







        </p>







    </body>







</html>

Edit:
yes, just tried it and it works.

BUT it doesnt open in a new window as OP wrote in his headline.
Sorry, don't know enough PHP and how to manage that :(
 
Last edited by a moderator:
Back
Top