<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2>Correct me if I'm wrong but the line</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff size=2><FONT 
face=Garamond color=#000000 size=3>var sport, times= prompt("Which sport like to 
do best, skiing, skydiving, basketball, or football?", "Please choose one from 
the list") <BR>prompt("How often do you do this, daily, weekly, or monthly?", 
"Please choose one from the list") </FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff size=2>It's 
is only variable times that gets an value, is it not !?</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff size=2>And 
then later on</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff size=2><FONT 
face=Garamond color=#000000 size=3>switch(sport, times){ 
</FONT><BR></FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2>according to Netscapes Javscript language guide the syntax is 
switch(expression) and an expression is explained:</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2>"</FONT><A name=1008309>An <I>expression</I> is any valid set of 
literals, variables, operators, and expressions that evaluates to a single 
value; the value can be a number, a string, or a logical value.</A><FONT 
face=Arial color=#0000ff size=2>"</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff size=2>A 
single value that is, so ... your switchstatement cannot work, if I understand 
the manual correctly that is.</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2>Regards</FONT></SPAN></DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=109500919-24012002><FONT face=Arial color=#0000ff 
size=2>Mikael</FONT></DIV></SPAN>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> javascript-admin@LaTech.edu 
  [mailto:javascript-admin@LaTech.edu]<B>On Behalf Of 
  </B>Sherwithme1@cs.com<BR><B>Sent:</B> Thursday, January 24, 2002 7:52 
  PM<BR><B>To:</B> javascript@LaTech.edu<BR><B>Subject:</B> [Javascript] Help 
  please<BR><BR></FONT></DIV><FONT face=arial,helvetica><FONT lang=0 
  face=Garamond size=3 FAMILY="SERIF">Could you tell what I am doing wrong? I 
  want both variables to be evaluated using the switch statement. Why is it not 
  working? <BR>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
  Transitional//EN"&gt; <BR><BR>&lt;html&gt; <BR>&lt;head&gt; 
  <BR>&lt;title&gt;Switch&lt;/title&gt; <BR>&lt;div align = "center"&gt; 
  <BR>&lt;/head&gt; <BR>&lt;body&gt; <BR>&lt;script language = "JavaScript1.2" 
  type = "text/javascript"&gt; <BR>var sport, times= prompt("Which sport like to 
  do best, skiing, skydiving, basketball, or football?", "Please choose one from 
  the list") <BR>prompt("How often do you do this, daily, weekly, or monthly?", 
  "Please choose one from the list") <BR>switch(sport, times){ <BR><BR>case 
  "skiing" &amp;&amp; "daily": <BR>document.write("You choose to ski daily"); 
  <BR>break; <BR>case "skiing" &amp;&amp; "weekly": <BR>document.write("You 
  choose to ski weekly"); <BR>break; <BR>case "skiing" &amp;&amp; "monthly": 
  <BR>document.write("You choose to ski monthly"); <BR>break; 
  <BR>case"skydiving" &amp;&amp; "daily": <BR>document.write("You choose to go 
  skydiving daily"); <BR>break; <BR>case"skydiving" &amp;&amp; "weekly": 
  <BR>document.write("You choose to go skydiving weekly"); <BR>break; 
  <BR>case"skydiving" &amp;&amp; "monthly": <BR>document.write("You choose to go 
  skydiving monthly"); <BR>break; <BR>case"basketball" &amp;&amp; "daily": 
  <BR>document.write("You choose to play basketball daily"); <BR>break; 
  <BR>case"basketball" &amp;&amp; "weekly": <BR>document.write("You choose to 
  play basketball weekly"); <BR>break; <BR>case"basketball" &amp;&amp; 
  "monthly": <BR>document.write("You choose to play basketball monthly"); 
  <BR>break; <BR>case"football" &amp;&amp; "daily": <BR>document.write("You 
  choose to play football daily"); <BR>break; <BR>case"football" &amp;&amp; 
  "weekly": <BR>document.write("You choose to play football weekly"); <BR>break; 
  <BR>case"football" &amp;&amp; "monthly": <BR>document.write("You choose to 
  play football monthly"); <BR>break; <BR>default: <BR>document.write("You didnt 
  answer the questions!"); <BR>break; <BR>} <BR><BR><BR>&lt;/script&gt; 
  <BR>&lt;/div&gt; <BR>&lt;/body&gt; <BR>&lt;/html&gt; <BR>Thanks for your help 
  <BR>Totally confused <BR>Sheryl</FONT> </FONT></BLOCKQUOTE></BODY></HTML>