DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Thread: Error Checking

  1. #1
    Ben Guest

    Error Checking


    I'm having trouble with adding error checking/trapping procedures to my web-based
    application. For example, if the user omits necessary information, my scripts
    should catch this omission and prompt the user for the omitted data. Invalid
    data submissions should also be detected by the scripts. My error checking/trapping
    procedures should prevent cryptic ODBC error messages from being displayed
    to the user. Does anyone know anything about this?

  2. #2
    MarkWhalen Guest

    Re: Error Checking


    "Ben" <arfisher@vt.edu> wrote:
    >
    >I'm having trouble with adding error checking/trapping procedures to my

    web-based
    >application. For example, if the user omits necessary information, my scripts
    >should catch this omission and prompt the user for the omitted data. Invalid
    >data submissions should also be detected by the scripts. My error checking/trapping
    >procedures should prevent cryptic ODBC error messages from being displayed
    >to the user. Does anyone know anything about this?


    I'm assuming your talking about catching errors before submitting an ASP
    to the server. Try a validation routine on the form's "onsubmit" method.
    If an error is found, you can use an alert/msgbox to warn the user, then
    return "False" from the routine to keep the page from being submitted. Hope
    this helps.

    Mark

  3. #3
    Ben Guest

    Re: Error Checking


    "MarkWhalen" <tracey_d_w_@yahoo.com> wrote:
    >
    >"Ben" <arfisher@vt.edu> wrote:
    >>
    >>I'm having trouble with adding error checking/trapping procedures to my

    >web-based
    >>application. For example, if the user omits necessary information, my scripts
    >>should catch this omission and prompt the user for the omitted data. Invalid
    >>data submissions should also be detected by the scripts. My error checking/trapping
    >>procedures should prevent cryptic ODBC error messages from being displayed
    >>to the user. Does anyone know anything about this?

    >
    >I'm assuming your talking about catching errors before submitting an ASP
    >to the server. Try a validation routine on the form's "onsubmit" method.
    >If an error is found, you can use an alert/msgbox to warn the user, then
    >return "False" from the routine to keep the page from being submitted. Hope
    >this helps.
    >
    >Mark


    I'll give it a shot. Thanks a lot.

    Ben



  4. #4
    Andy Guest

    Re: Error Checking


    Your best bet is to perform client side error checking using javascript when
    the form is submitted, this way you can trap most errors (i.e blank fields
    wrong data types etc) before the data is returned to the server and your
    SQL is run.

    an example of such can be found at one of the sites I wrote www.upccorp.com
    - goto to the subscribe / new subscription and look at the code.

    Hope this helps


    "Ben" <arfisher@vt.edu> wrote:
    >
    >I'm having trouble with adding error checking/trapping procedures to my

    web-based
    >application. For example, if the user omits necessary information, my scripts
    >should catch this omission and prompt the user for the omitted data. Invalid
    >data submissions should also be detected by the scripts. My error checking/trapping
    >procedures should prevent cryptic ODBC error messages from being displayed
    >to the user. Does anyone know anything about this?



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