[thelist] help with form validation using ASP/VBScript

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Mon Feb 28 15:56:11 CST 2005


Hi Ron,

   You don't need a separate validation page unless you want it that way.  You might want to keep all your validation code in an include file, but that's up to you.  I assume you're talking about server-side validation, right?

   It would probably help to know the content and context of this validation function.  Seems like you'd just submit the form to itself, detect the presence of Request.Form variables, and call the validation function.  Let me know if this isn't what you're after.

Cheers,

Peter

From: "Pringle, Ron" RPringle at aurora-il.org

Hi all-

Another ASP/VBScript question.

I have a database of events with multiple tables. I've created a form to
enter new events into the db, no problem.

However, upon submission of the form, I would like to first validate the
data. I would like to do this within the page the user is on.

So, upon clicking the submit button, required fields, etc. should be
checked, and if not valid, focus should return to that field. If all the
form fields are valid, then the record record should be entered into the db.

I wrote a function to check the fields of the form, but I'm unsure of how to
call the function from the form itself and how to feed the form data to the
function.

I've googled but most of what I found for form validation is either ASP.NET
or requires me to send the user to a seperate validation page.

Any help would be appreciated.

Regards,
Ron


More information about the thelist mailing list