|
| |
|
|
sarge
Posts: 374 From: London England Status: offline
|
custom confirmation with CDOSYS - 11/8/2007 20:06:48
'Lo all- I have a form that writes to an Access database, and the form has a custom confirmation page. Each field that I've specified on the confirmation page (using the Frontpage INSERT > Web component... etc.) seems to generate a 'webbot'. All of that works fine. Now I want to extend the functionality a bit, by sending an email from the confirmation page, using CDOSYS. I've used CDOSYS before... no problem. My question is - How/where do I store these webbot values, so that I can use them in CDOSYS? Thanks, Sarge
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/9/2007 2:26:36
Try capturing the field with this FP function: <%FP_Confirmfield("FieldName")%> where you substitute FieldName with the actual name of the confirmation field. Just put that code on the confirmation page and see if it returns anything.
_____________________________
William Lee
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/9/2007 11:04:11
Say, sarge, do you think I can visit your pages when you have completed them? I'm curious how you are doing this way.
_____________________________
William Lee
|
|
|
|
sarge
Posts: 374 From: London England Status: offline
|
RE: custom confirmation with CDOSYS - 11/10/2007 10:23:08
Hi William- Although I can capture the value by putting it in a textbox: <input type="text" name="Aname" value="<%FP_Confirmfield("A_name")%> "..... I don't know how to store this value for CDOSYS. ASP won't let me do this as in-line code: <% . . strBody = "name = " & FP_Confirmfield("A_name") . . %> Trouble is, I just don't know enough about ASP. Can you please point me in the right direction? Thanks, Sarge
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/10/2007 20:05:10
It could be due to where you put FP_ConfirmField("A_name") and CDOSYS codes, whether you put it before or after the webbot confirmation fields. That function is only available after the webbot has parsed, putting before the webbot may not get the desired result. Can you post the code on the confirmation page.
_____________________________
William Lee
|
|
|
|
sarge
Posts: 374 From: London England Status: offline
|
RE: custom confirmation with CDOSYS - 11/10/2007 23:48:09
Hi William- I've uploaded it to the server, so you can try it out: Click here to fill in the form & post it.
< Message edited by sarge -- 11/12/2007 8:34:58 >
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/11/2007 7:40:13
quote:
ORIGINAL: sarge I never know how to line up the line number in an error with the line numbers in Frontpage Let you in this one tip. Copy and paste the code(ASP and HTML, everything) into the top cell of Excel and they're all appear with line numbers. quote:
Set myCDOSYSMail = CreateObject("CDO.Message") Change it to Set myCDOSYSMail = Server.CreateObject("CDO.Message")
_____________________________
William Lee
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/11/2007 22:37:10
Will it work if you try something like this before the CDOSYS <% A_name=FP_Confirmfield("A_name") : : %> and then use the var A_name in your CDOSYS code?
< Message edited by William Lee -- 11/12/2007 1:07:20 >
_____________________________
William Lee
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/12/2007 4:58:27
Are you able to capture them like what you did with Request.Form("A_ID")? Instead of using FP_Confirmfield("A_name") try to use Request.Form("A_name").
_____________________________
William Lee
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: custom confirmation with CDOSYS - 11/12/2007 7:08:03
Okay this will be the last foray into this minefield, if it doesn't work we'll have to retrace our steps adopt a different strategy. Try this before I suggest another approach, which is the commonly used method. I checked the function FP_ConfirmField("FieldName") when the ConfirmationField webbot expands and it is as below:
Sub FP_ConfirmField(sField)
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Session.LCID = 1033
sOut = FP_SavedFields(sField)
sOut = Replace(sOut,"&","^^@^^")
sOut = Server.HTMLEncode(sOut)
sOut = Replace(sOut,"^^@^^","&")
Response.Write sOut
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
End Sub
There is a response.write statement inside the function and likely this is the cause for Type Mismatch error There is a FP_SavedFields("FieldName") variable and we might be able to make use of it. Suggest replace in the CDOSYS with FP_SavedFields("FieldName")
_____________________________
William Lee
|
|
|
|
pd_it_guy
Posts: 94 Joined: 3/4/2008 Status: offline
|
RE: custom confirmation with CDOSYS - 3/6/2008 13:41:40
Mr. Lee, I have been struggling with this very same problem for days now, and you have just solved it for me as well. Thanks so much for sharing your wisdom.
|
|
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
|
|
|