you can do it in the html header. note: not all browser may support this feature, the main ones do.
<head>
<meta http-equiv="Refresh" content="1;url=http://www.
</head>
Main Topics
Browse All Topics
Hi everyone, is there an alternative to redirect a url without using header location?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
you can do it in the html header. note: not all browser may support this feature, the main ones do.
<head>
<meta http-equiv="Refresh" content="1;url=http://www.
</head>
how can I put meta http-equiv="Refresh" content="1;url=http://www.
I have problem using header and ob_start... so I need alternative If I put Ob_start on the top of the page, my javascript cannot be load... if I put below the script, it give me header error.. Any ways to solve this?
<script language="JavaScript">
<!--
function open_on_entrance(url)
{
new_window = window.open('http://www.do
}
// -->
</script>
<BODY onload="open_on_entrance()
<?
ob_start();
blar blar
?>
Amend...
<script language="JavaScript">
<!--
function open_on_entrance(url)
{
new_window = window.open('http://www.do
}
// -->
</script>
<BODY onload="open_on_entrance()
<?
ob_start();
header("Location: members.php");
?>
echo '<html><head>';
echo '<meta http-equiv="Refresh" content="1;url=http://www.
echo '</head></body></body></ht
like this?
window.open(window.locatio
Uh, no. I think I misunderstood. Which window has a form you want to submit? The window being opened at http://www.domain.com? Why does the form need to be submitted? Can you just open the location with the args in the URL?
function open_on_entrance(url)
{
new_window = window.open('http://www.do
window.location="foo.html"
}
Actually I am writing a simple autologin script, the pop up window will submit the form automatically using body onload.
But what stuck my code is the opening new windows, I have few header location down the page after the javascript
<?
ob_start();
if($verify==true){
header("Location: main.php"); }
else{
header("Location: exit.php"); }
?>
I found out the problem lie with ob_start when I place ob_start above the javascript it won't work, but if I place below it the header location gives error..
That's because the output buffering keeps all output in memory. Then when you call header() it takes precedence over the output buffer content, and shows that first, in the HTTP header. Then the page redirects before your javascript code gets output to the browser.
I think the best solution might be to try to do away with the javascript popup window, and try to get the authentication to work with PHP, and keep the output buffering and header() calls. That is going to give you more reliable results than javascript.
Business Accounts
Answer for Membership
by: duerraPosted on 2003-08-22 at 07:17:38ID: 9203527
Hmm.... you could always just include the other file into the current scipt. I do that in one of my scripts and it works very well.