a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Sending form to database AND email

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Sending form to database AND email
Page: [1]
 
actofgod

 

Posts: 6
Joined: 1/5/2006
Status: offline

 
Sending form to database AND email - 9/4/2006 16:21:39   
I'm using FrontPage 2002 and have a page that submits a form to a database. I would like for the user to be able to check a box to optionally send the form to an email address too. FrontPage seems to only allow one or the other, so I assume this would require some custom ASP scripting.

I thought an easier way would be to first submit the form to the database, then on the confirmation page provide the same information in another form (using hidden fields) so the user can click to email that form if desired.

But how can I make the confirmation page (confirm.asp) receive the form values after they have been submitted to the database? The first form is submitted to "--WEBBOT-SELF--" and has a <!--webbot bot="SaveDatabase"> to store it in the database. Part of the webbot redirects it to the confirmation page. (u-confirmation-url="confirm.asp"), so I tried passing the form values in that string (as in u-confirmation-url="confirm.asp?content=<%=FP_FieldVal(fp_rs, 'content')%>") but it does not seem to be evaluated.

Any ideas on how this can be done? Or is there an easier way to submit to database and email simultaneously? I don't mind using a separate ASP script but would prefer to stick with FrontPage only as much as possible. Thanks so much for any help!
BeTheBall

 

Posts: 6385
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Sending form to database AND email - 9/4/2006 18:52:18   
This help any?

http://www.frontpagewebmaster.com/m-141000/mpage-1/key-cdonts//tm.htm#141000

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to actofgod)
actofgod

 

Posts: 6
Joined: 1/5/2006
Status: offline

 
RE: Sending form to database AND email - 9/5/2006 17:08:57   
Yes! CDONTS is exactly what I needed. Didn't really know what it was before, heh.

Still having one prob though - I know from your link above that I need to add the CDONTS email script in the top, right after it posts to the database but before it redirects. When I add the code, it changes back when I save it, so I tried running the Spooky Diet macro as suggested, but unfortunately it "breaks" the database saving when I do.

If I understand correctly, there is a hidden field variable "VTI-GROUP" that is set to 0 when the form submits, and the FP script checks for that to see if it needs to do the "add to db, email, then redirect" script at the top of the page.

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
(do the rest of the script..)

But whether I run the Spooky Diet script or manually remove the <!--webbot bot="SaveDatabase"...etc..> it stops working and doesn't seem to run the database/email/redirect script at all - it just goes back to the same page with no change.

I've tried changing the form where it says: <form METHOD="POST" action="--WEBBOT-SELF--" language="JavaScript" name="FrontPage_Form1"> to submit to the name of this page ("new.asp"), as in <form METHOD="Post" action="new.asp"...etc..> but that doesn't work either.

The required include file is still there (inside the form tags) <!--#include file="../_fpclass/fpdbform.inc"--> How can I remove the FP-generated "stuff" where I can add in the email script without breaking it? :)

Thanks a bunch for your help! I've been learning a lot.

(in reply to BeTheBall)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Sending form to database AND email - 9/5/2006 19:20:08   
Can you post the script you are using?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to actofgod)
actofgod

 

Posts: 6
Joined: 1/5/2006
Status: offline

 
RE: Sending form to database AND email - 9/13/2006 13:51:07   
Ok, I solved the problem by completely removing the FP-generated script. The form now posts to a new asp page, saveandemail.asp, which I created with the help of this document from Microsoft:

http://download.microsoft.com/download/fp2000/whitep/1/NT5XP/EN-US/cdonts2000.exe

(It's an exe that unzips a Word document.)

I did a little more research and found that CDO (CDOSYS) is the replacement for CDONTS. Hope this will be useful for anyone else looking for this information.

(in reply to actofgod)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> Sending form to database AND email
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts