Results 1 to 3 of 3

Thread: How to refresh parent Iframe

  1. #1
    Join Date
    Dec 2011

    How to refresh parent Iframe


    Normally this would be pretty straight forward, but I've tried a bunch of examples and none of them work.

    I am attempting to refresh a menu I have in an iframe. I will explain.

    I have a index.php page with 3 iframes in it (this is the parent). The top frame is for the site logo, the left frame is the menu (I call it menuframe) and the frame beside that is for the page content (contentframe).

    I have the menu with various options, when the user logs in it should refresh and show some addition options (logout, admin area, etc).

    The login page appears in the contentframe, once the user logins I want the menuframe to refresh to list these new admin options. I know my php session is working fine because if I manually refresh the menuframe it shows the items.

    I've tried the following in javascript

    document.getElementById('#menuframe').src = document.getElementById('#menuframe').src



    and a few other variations.

    Any idea how I can get this to work?

    Thanks so much.


  2. #2
    Join Date
    Dec 2011
    Ignore the # characters in the Elementids, that was a typo.

  3. #3
    Join Date
    Dec 2003
    Bucharest, ROMANIA
    Before anything else, I have a well grounded question: As long as you are using PHP files, why do you use frames? Why not PHP includes?

    Frames and framesets are obsolete, deprecated (in HTML and XHTML) or even not accepted (in HTML5).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles