• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18.  JavaScript Essentials > Changing Multiple Frames with One Link

Changing Multiple Frames with One Link

When you've set up a frameset, it's often nice to change the contents of more than one frame at a time.

To change multiple frames with just one link:

1.
First, set up your frameset as described in Chapter 10, Frames. Make sure each of the frames has a name (see step 7 on page 168).

2.
Type <A HREF=" to begin the link.

3.
Type javascript:location='url.html', where url.html is the page that you want to appear in the frame that contains the link. (If you don't want this frame to change, use the URL of the page that is currently in the frame.)

4.
Type ; (a semicolon) to separate this first statement from the next.

5.
Type parent.framename.location='newpage.html', where framename is the name of the frame that will contain the page specified by newpage.html.

6.
Repeat steps 4 and 5 for each additional frame whose contents you wish to change.

7.
Type "> to complete the link tag.

8.
Type the clickable text.

9.
Type </A>.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint