Re: Validate form input (ASP)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kevin Spencer (kspencer_at_takempis.com)
Date: 05/19/04


Date: Wed, 19 May 2004 08:29:27 -0400

It sounds like you're using FrontPage to create your validation script, by
setting properties of form fields, right? If so, FrontPage uses a special
WebBot to create the JavaScript that does the validation. As it is WebBot
code, you can't modify it without first removing the WebBot tags in the
code. After that, you won't be able to use the FrontPage tools to perform
validation any more, and you will be on your own.

To validate one textbox to match the value of another, you will not be able
to use any FrontPage validation. This is outside the typical validation
types and is not supported by FrontPage. You will have to modify your form
validation script by hand to check the value of one text box against
another.

-- 
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"xfile" <cou-cou@remove.msn.com> wrote in message
news:uDpZLIZPEHA.3328@TK2MSFTNGP09.phx.gbl...
> Hi:
>
> I spent a whole day trying to find a simple ASP code to validate two boxes
> input.
>
> All I got were java and ASP.NET and I've tried them but could not work
here.
>
> Can anyone please help?  Here is what I got
>
> The form is based on "ASP" and will deliver data and store into an Access
> database - this part is ok.
>
> If all fields have been filled out and submitted, it will link to a
> confirmation page - this part is ok.
>
> Upon submit, the form will first check if all the required input is being
> filled out - this part is ok.
>
> Problem is one more validation for two password boxes.  The two passwords
> have to match each other before the form is being processed.
>
> What I have tried ---
>
> (1) Scripts are either being ignored without processing for any
validation,
> or
> (2) An error message jumped out saying the two passwords do not match each
> other but the form still is being processed and the confirmation page
still
> be brought up.
>
> I know there is a "validate" option box for text box but have no idea of
how
> to set up the last two options for the value. I could not find anywhere
from
> Microsoft about any explanations of the set up, neither for the ASP
samples.
> I found some from other sites but did not work.
>
> Please show me or point me to where I can finish up these last validation.
>
> PS: Kindly do let me know where should I put those scripts in the code
> section if you do have them.  I have spent tremendous efforts just by
trying
> putting scripts on the right place but seems far from success.
>
> Thanks so much!!!I
>
>


Relevant Pages

  • Re: Forms
    ... dorayme pronounced to ... > add some client-side validation so they get feedback before submitting ... > scripts available in whatever language you prefer - many already set up ... js I can scrounge up for quick feedback. ...
    (alt.html)
  • Re: XHTML transitional and Frontpage 2003 validator
    ... If you're planning to migrate to .net you won't need FP validation. ... I'd tend to agree with Murray that there's no benefit to using xhtml. ... > Then we will make server side scripts of course. ... >>> Frontpage and using its nice easy to learn techniques... ...
    (microsoft.public.frontpage.client)
  • Re: Forms
    ... > that have required fields and that pick up user mistakes quickly for the ... the form *must* be validated server-side. ... add some client-side validation so they get feedback before submitting ... scripts available in whatever language you prefer - many already set up ...
    (alt.html)
  • Re: Using vbBinaryCompare
    ... > binary values in the registry. ... > this validation process because my scripts always crashes. ... ' If a value is present but uninitialized the RegRead method ...
    (microsoft.public.scripting.vbscript)
  • Re: XHTML transitional and Frontpage 2003 validator
    ... XHTML has no benefit if *you* make coding errors. ... >> validation. ... >>> Frontpage and using its nice easy to learn techniques... ... I overlooked you were talking about the generated scripts from form ...
    (microsoft.public.frontpage.client)