Java Reference
In-Depth Information
}
windowobject.location.href =
choosePage.options[choosePage.selectedIndex].value;
return true;
}
</script>
</head>
<body>
<form name=”form1” action=”“>
Select frame
<br />
Top
<input name=”radFrame” checked=”checked” type=”radio” />
Bottom
<input name=”radFrame” type=”radio” />
<br />
<br />
<select name=”choosePage” onchange=”choosePage_onchange()”>
<option value=”ch08_examp3_a.htm”>Page A</option>
<option value=”ch08_examp3_b.htm”>Page B</option>
<option value=”ch08_examp3_c.htm”>Page C</option>
<option value=”ch08_examp3_d.htm”>Page D</option>
</select>
</form>
</body>
</html>
Save this as ch08_examp3_menu.htm .
The frameMain frame contains a page that is simply a frameset for the frameTop and frameBottom pages.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Chapter 8: Example 3 Main</title>
</head>
<frameset rows=”50%,*”>
<frame name=”frameTop” src=”ch08_examp3_a.htm”>
<frame name=”frameBottom” src=”ch08_examp3_b.htm”>
</frameset>
</html>
Save this as ch08_examp3_main.htm .
The next four pages are mainly copies of the four pages — ch08_examp2_a.htm, ch08_examp2_b.htm,
ch08_examp2_c.htm, and ch08_examp2_d.htm — from example two. You'll need to make a few changes,
as highlighted in the following code. (Again, all the pages are identical except for the text shown in the
page, so only modifi cations to ch08_examp2_a.htm are shown. Amend the rest in a similar way.)
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
Search WWH ::




Custom Search