Required field validation control

kingston

New Member
I am noticing something odd about the required field validation control. All the other controls on this form(RegEx, Compare) controls show the error message when you go to the next field but I have to try and submit the form for the required field validation controls to validate. Is this the way the required field validation control works or is there something wrong with my code.<BR><BR>Here is an example of one of my required field validation controls:<BR><BR><td><input id="termname" size=10 runat="server"></td><td><BR><asp:RequiredFieldValidator id="RequiredFieldValidator2" <BR> ControlToValidate="termname"<BR> Display="Dynamic"<BR> ErrorMessage="Please be sure you enter in the name of your terminal."<BR> runat="server"/><BR><BR></td><BR><BR>MattI thought I read that it was designed this way. Seems odd but the form must be submited once for the validation to take place.That's what I thought but I wasn't sure. Now, if there was a way to fire off javascript code after validation controls javascript I will be all set but I am guessing I am asking for too much.<BR><BR>I did try onclick and onsubmit on the submit button. Onclick fired before the validation control jscript and onsubmit didn't fire at all.<BR><BR>Matt
 
Back
Top