Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script 4.17 listing:
<HTML> <HEAD> <TITLE>Using one frame's functions from another</TITLE> </HEAD> <FRAMESET COLS="30%,70%"> <FRAME SRC="left6.html" NAME="left" SCROLLING=AUTO> <FRAME SRC="frame6a.html" NAME="content" SCROLLING=AUTO> </FRAMESET> </HTML>
Script 4.18 listing:
<HTML> <HEAD> <TITLE>Nav Bar</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function setBanner() { if (document.images) { bannerImg = new Image bannerImg.src = 'blueBanner.gif' return (bannerImg.src) } return ("") } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <H1>Navigation Bar</H1> <H2><A HREF="frame6a.html" TARGET="content">Page 1</A><BR> <A HREF="frame6b.html" TARGET="content">Page 2</A><BR> <A HREF="frame6c.html" TARGET="content">Page 3</A></H2> </BODY> </HTML>
Script 4.19 listing:
<HTML> <HEAD> <TITLE>Must be in a frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE onLoad="if (document.images) {document.adBanner.src=parent.left.setBanner()}"> <CENTER> Today's Featured site:<BR> <IMG SRC="spacer.gif" WIDTH=400 HEIGHT=75 NAME="adBanner" ALT="banner"> </CENTER> <H1>You are now looking at page 1</H1> </BODY> </HTML>
Script 4.20 listing:
<HTML> <HEAD> <TITLE>Must be in a frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE onLoad="if (document.images) {document.adBanner.src=parent.left.setBanner()}"> <CENTER> Today's Featured site: <BR> <IMG SRC="spacer.gif" WIDTH=400 HEIGHT=75 NAME="adBanner" ALT="banner"> </CENTER> <H1>You are now looking at page 2</H1> </BODY> </HTML>
Script 4.21 listing:
<HTML> <HEAD> <TITLE>Must be in a frame</TITLE> </HEAD> <BODY BGCOLOR=WHITE onLoad="if (document.images) {document.adBanner.src=parent.left.setBanner()}"> <CENTER> Today's Featured site:<BR> <IMG SRC="spacer.gif" WIDTH=400 HEIGHT=75 NAME="adBanner" ALT="banner"> </CENTER> <H1>You are now looking at page 3</H1> </BODY> </HTML>