Page 1 of 1

[SOLVED] window.location.href problem

Posted: Mon Jun 14, 2004 11:22 pm
by valen53
i have a problem. i got a frameset in index.php. left 1 name left.php, right 1 name right.php.

when i click logout in left.php. it will goto login.php page.
<a href="logout.php" target="_parent">

the right.php have a auto refresh function. when the page session expiry, the page will goto login.php also.
But the problem is the login.php page only will display in right.php.
i have try use

Code: Select all

<?php
header("location: login.php"); 
?>
and

Code: Select all

<?php
echo'
<script language="JavaScript1.2">
window.location.target = "_parent"  
window.location.href = "http://'.$root_path.'/login.php" ; </script>
';
?>
any body can help me?
thank for reply

Posted: Tue Jun 15, 2004 3:28 am
by scorphus
You could try this:

Code: Select all

<?php
echo'
<script language="JavaScript" type="text/javascript">
<!--
	parent.location = "http://'.$root_path.'/login.php" ;
//-->
</script>
';
?>
Hope it helps,
Scorphus.

Posted: Tue Jun 15, 2004 8:41 pm
by valen53
thank u