www.webdeveloper.com
Results 1 to 6 of 6

Thread: frames

  1. #1
    Join Date
    Nov 2002
    Posts
    4

    frames

    hi... i need some help!!.. i have two frames: Header and main..

    i need when the user click a button that is in the main frame, i need to refresh the header frame... how can i do this??

    anyone could help me?!?!?!

  2. #2
    Join Date
    Nov 2002
    Location
    Hawaii
    Posts
    6
    First in your main.html or index.html file you must state the name of the frame along with the file src so:
    <frame src="header.html" name="header">

    Then when you want to make a link in the main frame that puts a page in the header frame you must put a target in the link like this:
    <a href="page.html" target="header">Click Here</a>

    See. You can do the same thing with other frames too. Just remember to name the frame and express a target frame in the link. Tell me how it goes.

  3. #3
    Join Date
    Nov 2002
    Posts
    4

    more helo

    what i wanna do is reload the header frame.... but i dont know how to do that..

  4. #4
    Join Date
    Nov 2002
    Location
    Hawaii
    Posts
    6
    I don't know how to do that but try some tutorials. They may help a little bit. Try http://www.webmonkey.com

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    It's easily done but since you'll end up with a link that that will not work for JavaScript free users you will need to write the link with JavaScript.

    <script type="text/javascript">
    <!--
    document.write('<a href="#">Refresh the Header Frame</a>');
    document.links[document.links.length-1].onclick = function () {window.parent.header.reload(true); return false};
    // -->
    </script>

    See http://developer.netscape.com/docs/m...on.htm#1194198 for details.
    Last edited by Charles; 11-29-2002 at 01:39 PM.

  6. #6
    Join Date
    Nov 2002
    Posts
    4,473
    Code:
    window.top.header.location.reload(true);
    Where "header" is the name of the frame to reload.

    Note that if somehow the user has navigated to another domain, you will not be able to access it using script .

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