Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script 4.27 listing:
<HTML> <HEAD> <TITLE>Frame Navigation</TITLE> </HEAD> <FRAMESET COLS="30%,70%"> <FRAME SRC="left8a.html" NAME="left" SCROLLING=AUTO> <FRAME SRC="frame8a.html" NAME="content" SCROLLING=AUTO> </FRAMESET> </HTML>
Script 4.28 listing:
<HTML> <HEAD> <TITLE>Nav Bar</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function setFrames(newPage) { parent.content.document.location.href = "frame" + newPage + ".html" document.location.href = "left" + newPage + ".html" } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <H1>Navigation Bar</H1> <H2>Page 1<BR> <A HREF="javascript:setFrames('8b')">Page 2</A><BR> <A HREF="javascript:setFrames('8c')">Page 3</A></H2> </BODY> </HTML>
Script 4.29 listing:
<HTML> <HEAD> <TITLE>Nav Bar</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function setFrames(newPage) { parent.content.document.location.href = "frame" + newPage + ".html" document.location.href = "left" + newPage + ".html" } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <H1>Navigation Bar</H1> <H2><A HREF="javascript:setFrames('8a')">Page 1</A><BR> Page 2<BR> <A HREF="javascript:setFrames('8c')">Page 3</A></H2> </BODY> </HTML>
Script 4.30 listing:
<HTML> <HEAD> <TITLE>Nav Bar</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function setFrames(newPage) { parent.content.document.location.href = "frame" + newPage + ".html" document.location.href = "left" + newPage + ".html" } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <H1>Navigation Bar</H1> <H2><A HREF="javascript:setFrames('8a')">Page 1</A><BR> <A HREF="javascript:setFrames('8b')">Page 2</A><BR> Page 3</H2> </BODY> </HTML>
Script 4.31 listing:
<HTML> <HEAD> <TITLE>Content frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <H1>You are now looking at page 1.</H1> </BODY> </HTML>
Script 4.32 listing:
<HTML> <HEAD> <TITLE>Content frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <H1>You are now looking at page 2.</H1> </BODY> </HTML>
Script 4.33 listing:
<HTML> <HEAD> <TITLE>Content frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <H1>You are now looking at page 3.</H1> </BODY> </HTML>