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!

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.