<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>JavaScript: Navigation mit Pull-Down-Menü</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description"
content="Übung JavaScript. Navigation mit Pull-Down-Menü">
<meta name="keywords" content="HTML, JavaScript">
<meta name="author" content="Roland Unger">
<script language="JavaScript" type="text/javascript">
function newWindow(url, win_name) {
window.open(url, win_name,
"width=600,height=400,screenX=50,screenY=50,toolbar=no,directories=no,menubar=yes,scrollbars=yes,resizable=yes");
}
var url_list= Array();
url_list[0]="html_js_242a.html";
url_list[1]="html_js_242b.html";
url_list[2]="html_js_242c.html";
function changeURL(which, new_window) {
if ((which.selectedIndex>=0) && (which.selectedIndex<=url_list.length)) {
if (new_window) { newWindow(url_list[which.selectedIndex], "") }
else { document.location.href = url_list[which.selectedIndex] }
}
}
</script>
</head>
<body>
<h2>Übung JavaScript</h2>
<h3>Navigation mit Pull-Down-Menü</h3>
<h4>Mit Aktionsschalter</h4>
<form>
<select name="Auswahl1" id="Auswahl1" size="1">
<option>Fenster 1</option>
<option>Fenster 2</option>
<option>Fenster 3</option>
</select>
<input type="button" value="Go!" onclick="changeURL(Auswahl1, true)">
</form>
<h4>Ohne Aktionsschalter: Ausführung sofort</h4>
<form>
<select name="Auswahl2" id="Auswahl2" size="3" onchange="changeURL(Auswahl2, true)">
<option>Fenster 1</option>
<option>Fenster 2</option>
<option>Fenster 3</option>
</select>
</form>
</body>
</html>