DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Steve Guest

    Problem validating form NEED HELP


    Okay --

    I have a form that the user inputs answers to questions for a contest. I
    wrote a javascript to validate it -- make sure that the fields are not blank
    and the answers are correct -- if the answers are not correct, i do not want
    it to run the cgi to send the email.

    The javascript seems to run fine, it properly validates the form -- if fields
    are blank or answers are wrong -- the only problem is.. whether the form
    is valid or not -- the cgi still runs and sends mail -- how do i stop this
    fromhappening??

    Any help would be great

    Steve

  2. #2
    Russell Jones Guest

    Re: Problem validating form NEED HELP

    Return false from your validation routine when validation fails.

    "Steve" <DJMeee@aol.com> wrote in message news:3c348507$1@147.208.176.211...
    >
    > Okay --
    >
    > I have a form that the user inputs answers to questions for a contest. I
    > wrote a javascript to validate it -- make sure that the fields are not

    blank
    > and the answers are correct -- if the answers are not correct, i do not

    want
    > it to run the cgi to send the email.
    >
    > The javascript seems to run fine, it properly validates the form -- if

    fields
    > are blank or answers are wrong -- the only problem is.. whether the form
    > is valid or not -- the cgi still runs and sends mail -- how do i stop this
    > fromhappening??
    >
    > Any help would be great
    >
    > Steve




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links