Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I assign two or more actions to one form

Status
Not open for further replies.

rnowrang

IS-IT--Management
May 6, 2004
27
US
Can I assign 2 or more actions to a form. I am trying to use ASP to store the input data from the form to an MS Access data base as well as email the contants to an email address using CDONTS. Can someone please help me. Thanks
 
sure you can - in fact it has nothing to do with the form as such.

After you do the rs.execute to insert the data, the next line starts the CDONTS routine.

If you are using recordset data, be sure not to close the connection until after you have sent the email or you can store the data you want in variables first if you prefer.

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
Thanks for the help. Can I assing two buttons to the same form one to send the data to a database and the other to email the data? Thanks
 
yep. But you may want to set it up so that the database is a true form and the email is nothing more than a plain button with some fancy programming behind it.

In fact, with the email one simply create a function and onClick run the email function without even reloading the page if you like as there is no form data needing to be submitted by the sound of it.

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
All the code for the CDONTS object I have found so far seems to be for VBscript ASP. Where can I find code for Javescript ASP? Can someone please help me? I have look all over the place for the Javescript version of the code. Thanks
 
sorry, no idea where to find JS CONTS.

But as far as I know there is no reason why you can't include VBScript in the page.

Steve Davis
hey.you@hahaha.com.au

Me? I can't even spell ASP!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top