Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script 4.14 listing:
<HTML> <HEAD> <TITLE>Setting one frame from another</TITLE> </HEAD> <FRAMESET COLS="30%,70%"> <FRAME SRC="left5.html" NAME="left" SCROLLING=AUTO> <FRAME SRC="frame5.html" NAME="content" SCROLLING=AUTO> </FRAMESET> </HTML>
Script 4.15 listing:
<HTML> <HEAD> <TITLE>Nav Bar</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function writeContent(thisPage) { parent.content.document.write("<HTML><HEAD><\/HEAD><BODY BGCOLOR=WHITE><H1>") parent.content.document.write("You are now looking at page "+thisPage+".") parent.content.document.write("<\/H1><\/BODY><\/HTML>") parent.content.document.close() } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <H1>Navigation Bar</H1> <H2><A HREF="javascript:writeContent(1)">Page 1</A><BR> <A HREF="javascript:writeContent(2)">Page 2</A><BR> <A HREF="javascript:writeContent(3)">Page 3</A></H2> </BODY> </HTML>
Script 4.16 listing:
<HTML> <HEAD> <TITLE>Content frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE> </BODY> </HTML>