Not exactly sure what you specific problem is. The above code is JS
, does this code run error free? The reason I ask is the three lines with trailing coluns, shouldnt these be semi coluns?
;;;"I am trying to use a similar construct in a form validation script on a page that uses ASP/SQL to generate the contents. In this case the default is selected everytime."
The function you havnt posted is the one where the problem is? If this is the case post the problem function would be better.
I dont believe ASP/VBScript has a switch function, the select case is probably what you are after:
Sub ChangeBackground (Color)
MyVar = lcase (Color)
Select Case MyVar
Wind is your friend