0

Hi, all

I have a web page that breaks down to several divs, two of them containing iframes (one for content, one for a menu):

<HEAD>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="styles/default.css?ver=33">
</HEAD>
<BODY>
<div id="wrapper">
    <div id="header">Welcome to my website</div>
    <div id="menu"><iframe name="frame-menu" id="frame-menu" src="menu.php" frameborder="0" height="30"></iframe></div>
    <div id="main"><iframe name="frame-main" id="frame-main" src="login.php" frameborder="0" width="878" height="700"></iframe></div>
    <div id="footer"><A HREF="about.php" TARGET="frame-main">About Us</A> - Contact</div>
    <div id="bottom">&copy;2015</div>
</div>
</BODY>

After the user logs in via the form on the 'login.php' page, it runs through a PHP script that registers their login, and takes them to an account summary page (dashboard.php). I'm looking to use a JQuery script in dashboard.php to reload the menu iframe, so that I can run the PHP script that changes the "Log In" link on the menu to a "Log Out" link.

I have tried altering the solution suggested in https://www.daniweb.com/web-development/php/threads/319050/reload-the-iframe-src , but I can't figure out how to alter it to fit my situation.

Thanks!

2
Contributors
2
Replies
15
Views
2 Years
Discussion Span
Last Post by jay.barnes
1

assuming everything is on the same domain

you could just do something like
parent.window.frames["myFrame"].location.href = 'menu.page'
from within the login iframe

0

I ended up using it in 'dashboard.php', but it worked perfectly. Thank you for your help!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.