Switch statement won't work! (JS/ASP) 
Author Message
 Switch statement won't work! (JS/ASP)

I tried this and it worked.  Make sure something is coming thru on the
querystring
Quote:

>I can't figure out why this won't work.


><%
>switch (Request.QueryString("place"))
>{
>   case "Chicago" :
>      Response.Write ("Flights to Chicago: Saturdays.");
>      break;
>   case "London" :
>      Response.Write ("Flights to London: Fridays.");
>      break;
>   case "New York" :
>      Response.Write ("Flights to New York: Fridays.");
>      break;
>   case "San Francisco" :
>      Response.Write ("Flights to San Francisco: Wednesdays.");
>      break;
>   default :
>      Response.Write ("Sorry, there are no flights to " +
>Request.QueryString("place") + ".<BR>");
>}
>Response.Write("Thank you for enquiring with Northern Airlines.<BR>");
>%>

>I butchered the code from a JavaScript site and made it ASP worthy. it
>SHOULD f*cking work though.

>In theory at least.

>Any ideas how I can get it too work would be appreciated. Thanks.

>--
>Owen Palmer

>ICQ: 10709834



Mon, 28 Apr 2003 03:00:00 GMT  
 Switch statement won't work! (JS/ASP)
I can't figure out why this won't work.


<%
switch (Request.QueryString("place"))
{
   case "Chicago" :
      Response.Write ("Flights to Chicago: Saturdays.");
      break;
   case "London" :
      Response.Write ("Flights to London: Fridays.");
      break;
   case "New York" :
      Response.Write ("Flights to New York: Fridays.");
      break;
   case "San Francisco" :
      Response.Write ("Flights to San Francisco: Wednesdays.");
      break;
   default :
      Response.Write ("Sorry, there are no flights to " +
Request.QueryString("place") + ".<BR>");

Quote:
}

Response.Write("Thank you for enquiring with Northern Airlines.<BR>");
%>

I butchered the code from a JavaScript site and made it ASP worthy. it
SHOULD f*cking work though.

In theory at least.

Any ideas how I can get it too work would be appreciated. Thanks.

--
Owen Palmer

ICQ: 10709834



Tue, 29 Apr 2003 10:08:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Variable won't work in SQL statement

2. VBS equivilent to JScript 'switch' statement

3. ASP won't work on PWS

4. Asp file won't work on local server

5. can any one tell me why this switch statement will only work once

6. Two Q's [Closing a file][why won't work]

7. Js files won't run

8. Calling DLL that has a Dir(\\share) statement doesn't work

9. if statement not working, what's wrong?!?

10. CDO.AddAttachment won't work

11. window.navigate won't work in Netscape

12. Why won't this work with NS6?

 

 
Powered by phpBB® Forum Software