Thanks Scott - This would be a client-side solution is that correct? I was hoping for a server side solution so browser platforms wouldn't be an issue... Any thoughts?
Tyler -----Original Message----- From: Scott Fitzsimmons [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 7:28 PM To: ActiveServerPages Subject: Re: writing attribute values to form elements <HEAD> <STYLE TYPE="text/css"> .Red {background: red;} .Blue {background: blue;} </STYLE> </HEAD> <FORM Method=Post onSubmit="return validateForm(this)"> <INPUT Type=Text Class="Blue" Name="textField"> <INPUT Type=Submit> </FORM> <SCRIPT Language=VbScript> Function validateForm(theForm) If theForm.textField.value = "" Then alert "There was an error with the form" theForm.textField.className = "Red" validateForm = False Else validateForm = True End If End Function </SCRIPT> Hope this helps! Scott. ----- Original Message ----- From: "Tyler Brown" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 5:38 AM Subject: writing attribute values to form elements > Help? All I want to do is target an explicit form element and assign a > value to it's class attribute. > > i.e. in validating a form if an element fails, as part of the response > process I want to do something like : > > set form.text1.class = 'altDisplay' > > Any pointers on manipulating the form on it's way back out? > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
