The Submit quandary

R

Robyn

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top