How do I - validate a form before the submit button is pressed?

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

After a form has been completed, is there a way for the user to validate the
data before the submit button is pressed?

The mission here is that the user can go back and correct inaccurate info,
before it is created on the database.

Thanks

Dave K
 
Dave said:
After a form has been completed, is there a way for the user to validate the
data before the submit button is pressed?

The mission here is that the user can go back and correct inaccurate info,
before it is created on the database.

Thanks

Dave K

You will need to use JavaScript. Here's one script I found:
http://www.dynamicdrive.com/dynamicindex16/requiredcheck.htm

There are plenty of of others out there. Whatever you do, don't rely on
client side validation, think of it only as an extra tool to make it easy
for users. You should still implement full server side validation. This is
important for many obvious reasons, but one to keep in mind here is that
many users have JavaScript disabled in their browser. If you relied on JS
only for validation, many forms would be submitted without any validation at
all.

That is what I like to call "A Bad Thing" (c)(tm)(r) :-)

Good luck!
 
You haven't been specific enough on what kind of validation you are seeking,
but you can use the FrontPage Validation features to do this.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
Is there an example somewhere that I can follow?

I have just started teaching myself ASP - so I am very new at this.

Thanks

Dave K
 
Basically duplicate your form.asp page, save it as review.asp, then change
the form.asp action to post to review.asp, then set the initial value of
each field on review.asp to show the value for the field from form.asp in
the following manner:

<%=Request.Form("Fieldname")%>


--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Back
Top