[SOLVED] window.location.href problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

[SOLVED] window.location.href problem

Post 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
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post 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.
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

Post by valen53 »

thank u
Post Reply