form validation javascript inside ASP ?

Discussion in 'ASP General' started by megabyte, Oct 12, 2005.

  1. megabyte

    megabyte Guest

    Hello;

    I have an ASP application which gathers information to put in a
    database via some forms - I would like to do the form validation
    (making sure some fields are not empty) with a Javascript script inside
    the ASP file - what is the syntax for doing this? Usually I would place
    the javascript inside the <head> tags, but ASP files don't have
    those...

    Thanks for any help.

    Eric.
    megabyte, Oct 12, 2005
    #1
    1. Advertising

  2. megabyte

    Mark Schupp Guest

    If you want the validation done on the client side you would include the
    script in the html output (inside the <head> tags if you like).

    If you want server-side validation (and you should always do it server-side
    in addition to any client-side validation) then put the code where ever you
    need it if you are using jscript in the ASP page. If you are using VBScript
    in the page then you probably want to use VBScript for the server-side
    validation as well.

    --
    --Mark Schupp


    "megabyte" <> wrote in message
    news:...
    > Hello;
    >
    > I have an ASP application which gathers information to put in a
    > database via some forms - I would like to do the form validation
    > (making sure some fields are not empty) with a Javascript script inside
    > the ASP file - what is the syntax for doing this? Usually I would place
    > the javascript inside the <head> tags, but ASP files don't have
    > those...
    >
    > Thanks for any help.
    >
    > Eric.
    >
    Mark Schupp, Oct 12, 2005
    #2
    1. Advertising

  3. megabyte

    Bullschmidt Guest

    Some JavaScript validation links (and they work fine on ASP pages just
    as they do on regular HTML pages):

    Javascript Field Validations -- Client Side Scripting by Nannette
    Thacker - 8/19/1999
    http://www.shiningstar.net/articles/articles/javascript/javascriptvalida
    tions.asp?ID=AW

    Form Validation Using Javascript - 9/19/1998
    http://www.4guysfromrolla.com/webtech/091998-1.shtml
    Good tips such as saving JavaScript functions in a file called
    DataValidation.js and including this in pages that need this.
    JavaScript functions.

    WebDaily: Your daily source for Web Technology Tips and Tricks! -
    10/27/1998
    http://www.4guysfromrolla.com/webtech/102798-1.shtml
    Just checks if fields filled in.

    Best regards,
    J. Paul Schmidt, Freelance Web and Database Developer
    http://www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

    <<
    I have an ASP application which gathers information to put in a database
    via some forms - I would like to do the form validation (making sure
    some fields are not empty) with a Javascript script inside the ASP file
    - what is the syntax for doing this? Usually I would place the
    javascript inside the <head> tags, but ASP files don't have
    those...
    >>


    *** Sent via Developersdex http://www.developersdex.com ***
    Bullschmidt, Oct 17, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    2
    Views:
    6,054
  2. Grigory Temchenko
    Replies:
    0
    Views:
    316
    Grigory Temchenko
    Dec 28, 2008
  3. Replies:
    7
    Views:
    602
  4. bnp
    Replies:
    4
    Views:
    294
  5. francisco lopez
    Replies:
    2
    Views:
    249
    Hywel Jenkins
    Dec 30, 2004
Loading...

Share This Page