Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case Statement

Status
Not open for further replies.

Netman06

Technical User
Joined
Aug 15, 2006
Messages
70
Location
US
Hello,



I have a case statement and would like to know of a way, that I can have the logon script check all case statements, and if it does not find a match, go to



Case Else, but I want it to exit the case select, and not to error if it does not find a match.



What I was thinking is if there is a way to go to Case Else and of this document.write("Who are you?") exit the Case Statement and contuine to run the vbscript.



Thanks, Mike




Dim myName
myName = "supercalifragilisticexpialidocious"
Select Case myName
Case "Bob"
document.write("Been busy Bob?")
Case "Sara"
document.write("Seen any slick sunglasses Sara?")
Case "Charles"
document.write("Did you chuck your chowder Charles?")
Case Else
document.write("Who are you?")
End Select

 
If this is client-side VBScript, your document.write statements will most likely delete the page and everything on it, including the rest of the script, when writing the indicated text.

What do you really want to do? The code you provided isn't anything for real life, and to help you, we need to see the real stuff. Fake code = fake answers, real code = real answers.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top