How do I switch out contents of one frame?
Results 1 to 2 of 2

Thread: How do I switch out contents of one frame?

  1. #1
    Join Date
    Jun 2000
    Location
    California
    Posts
    4,141

    How do I switch out contents of one frame?

    I'm making a web site with an expandable menu in the left frame and the usual crap in the right frame. How do I switch out the contents of the right frame *only* whenever a menu option is clicked?

    Right now, a menu option calls a dupe of the home page (only with new text in the right frame). It works just fine but I'm calling a new menu as well, and when I do, it reinitializes to a closed state.

    If I could switch out just the contents of the right frame, the menu (being untouched) would remain expanded and users would be able to see the list of sup-topics at all times.

    Thanks - rev

  2. #2
    Join Date
    Jun 2000
    Location
    California
    Posts
    4,141
    Found it.

    Assume you have two frames on the home page, A containing the menu, B being the content frame.

    In frame B you place an iframe statement, something like this:
    <iframe name="FRAME2" width="681" height="575" scrolling="yes" frameborder="0" src="intro.html"></iframe>

    Assume you have two different pages of content.

    src="intro.html" specifies the initial content displayed when the Home page is opened.

    When you want to switch out the content of frame B, you add target= to your menu link code in frame A. i.e.

    <a href="new_content.html" target="FRAMEB">New Page</a>

    When the menu link is clicked, the new content is displayed in frame B.

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
  •