The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help with client side validation on asp form

HI all,
I am new to Asp and was surprised at how hard it was for me to figure out how to create a simple form to send an email (compared to PHP).
Anyway I have the form working and the tutorial I used to learn it included validation. But it returns error messages after submission and plops them at the top of the page pushing the entire design down.

I want to either be able to choose where the errors are displayed on the page (Response.Write), or use a simpler JavaScript client side validation before it is submitted.

The form is just for basic contact info, no passwords or anything funky.

' Here we quickly check/validate the information entered
' These checks could easily be improved to look for more things
If IsValidEmail(ContactUs_Email) = "False" Then
IsError = "Yes"
Response.Write("<font color=""red"">You did not enter a valid email address.</font><br>")
End If

then has some more variables, ends the if statements and goes into the body of the message
End If

' If there were no input errors and the action of the form is "SendEMail" we send the email off
If Action = "SendEmail" And IsError <> "Yes" Then

Thanks for the help. I successfully added the error message in the right place, but it appears all of the time. How do I phrase the code so that it only appears if there is an error?
so right now I added to the error check:
If IsValidEmail(ContactUs_Email) = "False" Then
IsError = "Yes"
errmsg = ("<font color=""red"">You did not enter a valid email address.</font><br>")
End If

then under the form field:
<% Response.Write("<font color=""red"" >You did not enter a valid email address.</font><br>") %>

Obviously i don't have a full grasp on asp format, so further help is appreciated.