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
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Can you Reload a specific Frame?

    After two years working on it and posting here, I learned out how to conditionally load a .js file. That works fine now.

    To change the .js file (which is a database), however, I have to Reload the entire page and in doing so I lose what's in memory... the status of too many variables to save in a cookie.

    Just got this hairbrain idea... could I just Reload a single Frame?

    That way I could load a different .js file (database) into that Frame (which would not display on the user's screen) and access the new data in that Frame from the Frame I am working in. This Frame would be used only to load a new database.

    This Frame would contain a function to Reload itself, and I would call this function from the Frame I am working in (which would not Reload). Before calling the function, I would write a cookie so that when the Frame reloaded the cookie would tell it which database to load.

    I suppose this is all wrong and that you can only Reload the whole page... but I keep trying. I've been working on the idea of loading a different .js file without losing what's in memory for about a year now.

    Thanks, Peter

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, you can if it's one page in the frame. Try this:

    <script type="text/javascript">
    <!--
    function reloadWin() {
    window.location.reload();
    }
    // -->
    </script>

    Just add that into the page that you want to reload. As for several pages, I have no idea.

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    To reload a frame from another frame:

    top.frames['nameOfTargetFrame'].location.reload();
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Vancouver, WA
    Posts
    233
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks, it's working great.


  •  

    Posting Permissions

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