Source for JavaScript Demo select.html

<HEAD>
<TITLE>EIW JavaScript Demos - Hot Select Menu</TITLE>


<H2>Use the select menu to pick a famous quote</H2>

<HR>
<FORM NAME=frm>
<TABLE>
<TR>
<TD VALIGN=TOP>Select a Person:
<SELECT Name=selector size=1 onChange="newquote()">
  <OPTION VALUE=0 SELECTED>Yogi Berra
  <OPTION VALUE=1>Bill Clinton
  <OPTION VALUE=2>Cookie Monster
  <OPTION VALUE=3>Dave H.
  <OPTION VALUE=4>Anonymous Student
  <OPTION VALUE=5>Gerald Phalenicki
</SELECT>
</TD>
<TD WIDTH=50> </TD>

<TD>
<TEXTAREA COLS=40 ROWS=5  NAME=quote>
</TEXTAREA>
</TD>
</TR>
</TABLE>
</FORM>

<SCRIPT>

 quotes = new Array("The game isn't over til it's over",
                   "It depends on what the meaning\nof the word is is.",
                   "COOOOOOOKKKIIIEEE!",
                   "blah, blah, blah, blah, blah, blah, blah, blah, blah\n" +
                   "foo\nblah, blah, blah, blah, blah, blah, blah, ...",
                   "I made cookies, but my dog ate them...",
		   "There are not any false statements"
);

function showquote(x) {
   document.frm.quote.value='"'+quotes[x]+'"';
}

function newquote() {
  index = document.frm.selector.selectedIndex;
  author = document.frm.selector.options[index].value;
  showquote(author);
}

newquote(0);

</SCRIPT>




<H2>Use this select to switch to a different JavaScript demo</H2>

<HR>
<FORM NAME=demoform>
<TABLE>
<TR>
<TD VALIGN=TOP>Select a Demo:
<SELECT Name=demoselector size=1 onChange="newdemo()">
  <OPTION VALUE=0 SELECTED>Demo Home Page
  <OPTION VALUE=1>Cookie Chase
  <OPTION VALUE=2>Moving Browser
  <OPTION VALUE=3>Active Bullets
  <OPTION VALUE=4>Document Object Properties
  <OPTION VALUE=5>Background Color
  <OPTION VALUE=6>Back Button
</SELECT>
</TD>
</TR>
</TABLE>
</FORM>

<SCRIPT>

 urls = new Array("index.html","cookie.html","windowjump.html",
                   "activebullet.html", "props.html", "background.html",
                   "backbutton.html");

function gotourl(x) {
   document.location= urls[x];
}

function newdemo() {
  index = document.demoform.demoselector.selectedIndex;
  num = document.demoform.demoselector.options[index].value;
  gotourl(num);
}

</SCRIPT>