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

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

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

 

Two Things at once

 
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 >> Two Things at once
Page: [1]
 
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
Two Things at once - 4/6/2001 16:20:00   
Howdy.

I am trying to have a form submit to a database and e-mail the results back to me so I know when someone has submitted information. I tried to add another action to the code, but that did not work. Don't really know where to go from here.

Thanks in advance
Joe

joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/6/2001 16:34:00   
In addition, I do not have access to the _fpclass directory, or I just can't find it. I work for a university and I probably do not have access to change that sort of stuff. I was wondering, however, if I could write a function in the page. Unfortunately, I don't know how to do it.

All I want is an email saying that someone has submitted information. Is that too much to ask for?!?!

sorry for whining
Joe


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/6/2001 16:36:00   
Youll find the directory is hidden tools > web settings > advanced > show documnets

(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/6/2001 17:25:00   
Spooky,

thanks for the tip, But I could not get the tutorial to work. I may have made a mistake, but I copied and pasted right into that .inc file. I made changes to sTo and sBody variables, but that seems like all I need to do. Please let me know if there is more customization for me to do. Here is how the function looks now:

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
sFrom = Whoever
sTo = "careers@truman.edu"
sSubject = szTitle
sBody = "Someone has just registered"
Set myCDONTSMail= CreateObject("CDONTS.NewMail")
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing
Response.Write "<html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<meta http-equiv=""Content-Type"" content=" & szCharSet & ">" & vbCrLf
Response.Write "<title> " & szTitle & "</title>" & vbCrLf
Response.Write "</head>" & vbCrLf
Response.Write "<body>" & vbCrLf
Response.Write "<h1> " & szTitle & "</h1>" & vbCrLf
Response.Write "<p> " & szMsg1 &"</p>" & vbCrLf
Response.Write "<p>" & vbCrLf
For Each item in Request.Form
If item <> "VTI-GROUP" Then
Response.Write "<b>" & item & "</b>" & ": " & Request.Form(item) & "<BR>" & vbCrLf
End If
Next
Response.Write "</p>" & vbCrLf
Response.Write "<p> <a href=""" & szUrl & """>" & szMsg2 & "</a></p>" & vbCrLf
Response.Write "</body>" & vbCrLf
Response.Write "</html>" & vbCrLf
Response.End
End Function


-------
Thanks
Joe


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/6/2001 19:33:00   
Do you know if you actually have the CDO mail component on your server?

(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/9/2001 20:23:00   
I only know that we have the frontpage server extensions on our server, but I will check with our administrator if we have that particular package. I am able to create pages that email information (a contact us page), if that is any help

Thanks again,


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/9/2001 23:53:00   
Use just the mail part on an asp page to see if it works


<%
sFrom = Whoever
sTo = "careers@truman.edu"
sSubject = szTitle
sBody = "Someone has just registered"
Set myCDONTSMail= CreateObject("CDONTS.NewMail")
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing
%>


(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/9/2001 13:32:00   
Where can I put this in my page. does it go within the FORM tags or in the HEAD or the BODY. Or should I make it into a function, and if so, where should I call the function.

Actually, I really don't know how to write an ASP function. Boy am I hopeless

Thanks again


(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/9/2001 14:28:00   
Yeah, I tried to paste it in many different places but I could not get it to go.

Any other suggestions? I really do appreciate your help. i guess I need to take the advice of the website. LEARN ASP


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/9/2001 15:05:00   
That script would be your entire page.

Paste it into notepad, then copy & paste it into html view in FP (above the <html> tag)

Save the page as .asp then open it on your web site.
Youll either get an email or an error


(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/9/2001 16:08:00   
Bad News!!

I could not get that one to go either. I pasted that exactly on a blank page above the <HTML> tag. I loaded it up and I got no email and no error message

Again, I appreciate you help. I know that this can be solved.

Joe


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/9/2001 16:34:00   
url?

(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/9/2001 16:44:00   
career.truman.edu/CareerExpo/exporegistration.asp
The form that I have is pretty big

I don't think we have the CDO mail component. I just spoke to our administrator and she gave me some tips about what else I can do.

We have just recently gone to this server and the powers that be are still looking into CDO components. I don't even know what they are!!

Thanks again for your time. If I figure out another way, I will let the forum know.


(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/10/2001 23:21:00   
I think that my administrator installed the CDO Mail component and I got the script to work. I am very excited about this!

Here is my next problem. I have two forms running and I only want email notification from one of them.

I put the script before the <HTML> tag but it sent an email when the page loaded. I was thinking maybe an if-then statement in the fpdbform.inc or making it into a function called when the info is submitted. Unfortunately, I don't know how to form either.

I know you have helped a lot, but any more help would be greatley appreciated

Thanks
Joe


(in reply to joefanthorp)
Spooky

 

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

 
RE: Two Things at once - 4/10/2001 17:19:00   
It is best to leave out of the include files, and an if then is the best option.

Each form could have a hidden value :

Name........Value
formValue = "form1"
formValue = "form2"

<%If request.form("formValue") = "form1" then
'Do this script
Elseif request.form("formValue") = "form2" then
' do this script
End if
%>

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!


(in reply to joefanthorp)
joefanthorp

 

Posts: 20
From: Kirksville Missouri USA
Status: offline

 
RE: Two Things at once - 4/10/2001 18:25:00   
OK, still does not work. Here is what I have

--this is the <form>line:
<form method="POST" action="--WEBBOT-SELF--" name="FrontPage_Form1" formValue ="ExpoForm" onsubmit="return FrontPage_Form1_Validator(this)">

--this is an excerpt of fpdbform.inc
--including the if-then Statement

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
if request.form("formValue")="ExpoForm" then
sFrom = "ExpoRegistration@truman.edu"
sTo = "careers@truman.edu"
sSubject = "Career Expo Registration"
sBody = "A new company has registered for Expo"
Set myCDONTSMail= CreateObject("CDONTS.NewMail")
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing
end if
Response.Write "<html>" & vbCrLf


I still can't get it to work


(in reply to joefanthorp)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Two Things at once
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