<!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&uuml;</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="description"
      content="&Uuml;bung JavaScript. Navigation mit Pull-Down-Men&uuml;">
<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");
   // nach dem Kommas keine Leerraueme eingeben!
}

var url_list=new 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>&Uuml;bung JavaScript</h2>
<h3>Navigation mit Pull-Down-Men&uuml;</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&uuml;hrung sofort</h4>

<form>
 <select name="Auswahl2" id="Auswahl2" size="3" onchange="changeURL(Auswahl2, true)">
 <!-- Ereignis onclick beim Netscape Navigator wirkungslos -->
  <option>Fenster 1</option>
  <option>Fenster 2</option>
  <option>Fenster 3</option>
 </select>
</form>

</body>
</html>