Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts

    SESSION Within A Frame

    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 Code:
    <?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>
            <? 
            

            
    ?>

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,468
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    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.

  • #4
    Regular Coder
    Join Date
    Mar 2006
    Posts
    459
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •