Well first off I would just use radio buttons for this that way the user HAS to select a correct color. Otherwise just feed all the possible values into an IF THEN ELSE:<BR><BR>DIM color, buttonColor<BR>color = request("color")<BR><BR>IF color="white" OR color="black" OR color="blue" ... THEN<BR>buttonColor = color<BR>ELSE<BR>Invalid color try again<BR>END IF<BR><BR>Thank you come again!
Well m'lady you need to look into using Regular Expressions. They are used for validating this kind of information. In fact you might need the regExp's and the if then else. Or you might just MAKE your users enter a hex.<BR><BR>Thank you come again!
why not provide a table in which they can actually see web safe colours and the hex values?<BR><BR>Don't let them type in a hex value but make them click on the colour they require then you can set the hex value yourself.<BR><BR>Web safe colours can be found at<BR><BR>http://www.lynda.com/hexh.html<BR><BR>I'm sure you could convert this page realtively easily to do the job....
I had a need for allowing users to specify colors for an app I was doing. Bill was nice enough to provide some code for it at:<BR><BR>http://www.aspmessageboard.com/forum/showMessage.asp?M=230791&F=25&P=1<BR><BR><BR>