SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    reload left hand frame automatically ?

    Hi there, I have a page using frames (a tree menu in the left hand frame and the main body in the right hand frame) Could somebody tell me how I can add some javascript into a page that will reload the left hand frame of my site (my tree menu) automatically.??.. ive seen solutions that involve reload buttons, but I need it to update the left hand frame as part of the code


    Is this possible

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Somebody told me this would work

    Code:
    <script language="JavaScript">
            parent.frames[number-0].location.reload();
             </script>
    but it doesnt

  3. #3
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now im even more confused .....ive never touched javascript so have no idea how it works.. I tried to get this done in PHP to no avail so it was reccommended i ask one of the JS gurus on this forum

  5. #5
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, got it

    <script language="JavaScript"><!--
    javascriptarent.menuframe.location.reload()
    </script>


    thanks

  6. #6
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your example contains an error, the //--> part is missing. You don't need that though, that was use for browsers that did not have any JavaScript support and outputted the code in the page. This was like over 10 years back, so no need to do that anymore.

    Also, you can skip the javascript: part.


Bookmarks

Posting Permissions

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