...

View Full Version : SESSION Within A Frame



tomyknoker
07-23-2007, 02:49 PM
Hi all... I am working on a site that has been set up using frames, basically the top frame holds some menu items and a 'close window' button, this obviously does as the name suggests... Unfortunately a few issues. When I log in in the bottom frame the top frame log out button doesn't display, UNTIL I refresh the whole window... Anyone know how I can make this refresh both frames when the user logs in?



<?php session_start(); ?>

<?php
if ($_SESSION['blnUserLoggedIn'] == true)
{
?>
<a href="logout.php" onMouseOver="MM_swapImage('Image222','','images/log_out_1.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/log_out_0.gif" name="Image222" width="46" height="17" border="0" id="Image222"> </a>
<?
}
else
{
?>
<a href="javascript:top.window.close()" onMouseOver="MM_swapImage('Image1','','images/close_window_on.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/close_window_off.gif" name="Image1" width="94" height="17" border="0" id="Image1"> </a>
<?
}
?>

mlseim
07-23-2007, 05:32 PM
I'm thinking of something more in the lines of Javascripting.

I assume you're working on an existing site that uses frames and
you're sort of stuck with it ... can you talk them out of using frames?

With PHP ... and no frames, you can control the navigation menus and
content within <div>'s ... this would make the whole site more integrated.

aedrin
07-23-2007, 11:22 PM
I assume you're working on an existing site that uses frames and
you're sort of stuck with it ... can you talk them out of using frames?

There are situations where using frames makes more sense than a fixed page.

tomyknoker
07-23-2007, 11:53 PM
Not really as it's a huge site so don't really want to have to change it all as well... Should I post in the JavaScript forum? Or can a mod move this post?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum