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

Chapter 20. Manipulating Windows and Fra... > JavaScript Frames Example

JavaScript Frames Example

In this frames example, you will see how to set up a Web page that is roughly equivalent to the windows example shown earlier in this chapter. A Web page will be created with three frames; the top one will have buttons that use attached JavaScripts to change the contents of the other two. Listing 20.15 shows the main document, which simply defines the frameset to be used.

Code Listing 20.15. FramEx.htm—The Main Document of a Framed Web Page Will Usually Be Pretty Simple, Just Setting Up the Frameset

<HTML>
<HEAD>
<TITLE>JavaScript Frames Example</TITLE>
</HEAD>
<FRAMESET ROWS="25%,*">
   <FRAME SRC="Buttons.htm" NAME="MyFrameBut">
   <FRAMESET COLS="200,*">
      <FRAME SRC="" NAME="MyFramePic">
      <FRAME SRC="" NAME="MyFrameBio">
   </FRAMESET>
</FRAMESET>
</HTML>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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