The Submit quandary

Discussion in 'Javascript' started by Robyn, Sep 8, 2003.

  1. Robyn

    Robyn Guest

    Hi,
    This is probably an incredibly stupid question - I have carefully searched
    the http://www.jibbering.com/faq for the answer on this one. I have an .asp
    page that contains a data-entry form, data to ultimately be sent to a SQL
    Server table using an ADODB.Connection thingie. The data validation is done
    in a Javascript routine called in the form's onsubmit:

    <FORM name="GetHrs" action="test.asp" method=post
    onsubmit="return(DoCheck(this));">

    The DoCheck() function is as follows:
    function DoCheck(formobj){
    if(formCheck(formobj)){
    return true;
    }else{
    return false;
    }
    }

    What I am trying to do is:
    1. have a self-referencing .asp page
    2. do the data validation in Javascript
    3. when the data checks out ok, call the method (probably some .ASP #include
    or something) that will save the data
    4. have the same page still up, but with the fields cleared, ready for the
    next entry

    I've taken care of #1, #2, and #4.
    #3 - validating the data and then saving it - is where the headache comes
    in. The samples I've found in Javascript data validation don't really
    indicate how to proceed after the data checks ok - if I've got the data
    validation routine in the form's onsubmit 'method?' where would I put the
    call to the routine to save the data? Or am I way off track here?

    Thanks for following this question, and for your kind suggestions in
    advance...
    Kind regards,
    Robyn
    Robyn, Sep 8, 2003
    #1
    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:
    1
    Views:
    1,691
  2. Ghafran Abbas
    Replies:
    0
    Views:
    4,208
    Ghafran Abbas
    Oct 12, 2004
  3. The Crow
    Replies:
    2
    Views:
    4,376
    Bruce Barker
    Sep 27, 2005
  4. Megha Vishwanath
    Replies:
    2
    Views:
    9,826
    tutorialsmaster
    Oct 2, 2009
  5. Eric S. Johansson

    in a bit of a quandary about an SMTP receiver

    Eric S. Johansson, Jul 15, 2007, in forum: Python
    Replies:
    0
    Views:
    260
    Eric S. Johansson
    Jul 15, 2007
Loading...

Share This Page