|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Generate email when I click button?When I click "save" after adding a new record (which contains, among other
fields, the person's email address), I want an email to automatically be sent to that person (at the email that is in the field of that record). How can I do this? Thanks so much, it really means so much to me!!! "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798bc3f05f9b3@uwe...> When I click "save" after adding a new record (which contains, among other What does your Web host support?> fields, the person's email address), I want an email to automatically be sent > to that person (at the email that is in the field of that record). How can I > do this? Perhaps, CDO.Message or ASPMail. First off, thank you SO much for responding - it mean's a lot to me - i've
been trying to get this done forever. So I have godaddy.com. When I look up what they support, I get the following: CDO.MESSAGE CDONTS.NewMail I'm assuming that means that godaddy.com supports CDO.Message. Thank you so so so so so much again. My heart skipped a beat when I saw that somebody had finally [at least tried] to answer my cries for help. Tim McKirahan wrote: >> When I click "save" after adding a new record (which contains, among other >> fields, the person's email address), I want an email to automatically be sent >> to that person (at the email that is in the field of that record). How can I >> do this? > >What does your Web host support? >Perhaps, CDO.Message or ASPMail. "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798cc27bb482e@uwe...> First off, thank you SO much for responding - it mean's a lot to me - i've [snip]> been trying to get this done forever. > > So I have godaddy.com. When I look up what they support, I get the following: > > > CDO.MESSAGE > CDONTS.NewMail > > I'm assuming that means that godaddy.com supports CDO.Message. Try this; watch for word-wrap. The Response.Write() statement invokes the function; modify it to suit your needs. Just call the function by passing in 3 parms: email address, subject, and body. The value of "cHST" (Host) is what GoDaddy requires. The value of "cFRM" (From) is your email address. Suucess/failure reporting has been commented out as you may want to log the results rather than display them. <%@ Language="VBScript" %> <% Option Explicit Response.Write("Email = " & Email("n***@mckirahan.com","Test","Test!")) Function Email(sAddr,sSubj,sBody) Email = False On Error Resume Next '* '* Declare Constants '* Const cCDO = "http://schemas.microsoft.com/cdo/configuration/" Const cHST = "relay-hosting.secureserver.net" Const cFRM = "postmaster@{your~domain.com}" '* '* Send Email '* Dim objCFG Set objCFG = Server.CreateObject("CDO.Configuration") objCFG.Fields.Item(cCDO & "sendusing") = 2 objCFG.Fields.Item(cCDO & "smtpserver") = cHST objCFG.Fields.Item(cCDO & "smtpserverport") = 25 objCFG.Fields.Update Dim objCDO Set objCDO = Server.CreateObject("CDO.Message") objCDO.From = cFRM objCDO.To = sAddr 'objCDO.BCC = "" 'objCDO.CC = "" objCDO.Subject = sSubj objCDO.TextBody = sBody 'objCDO.HTMLBody = sBody 'objCDO.AddAttachment = "" objCDO.Configuration = objCFG objCDO.Send ' If Err = 0 Then ' Response.Write("<br><br><b>E-mail has been sent.</b>") ' Else ' Response.Write("<br><b>Sub Email()</b>") ' Response.Write("<br><b>CDO Failed:</b> " & Err.Description) ' Response.Write("<br><b>CDO 'Addr':</b> " & sAddr) ' Response.Write("<br><b>CDO 'Subj':</b> " & sSubj) ' Response.Write("<br><b>CDO 'Body':</b> " & sBody) ' End If Set objCDO = Nothing Set objCFG = Nothing '* '* Return '* On Error GoTo 0 Email = True End Function %> McKirahan,
Before I do this, where do I put all of this text? That has been one of the things that is unclear to me. Do I put it next to the like where the save- button is in the html, or what? Thanks so much again! McKirahan wrote: Show quoteHide quote >> First off, thank you SO much for responding - it mean's a lot to me - i've >> been trying to get this done forever. >[quoted text clipped - 5 lines] >> >> I'm assuming that means that godaddy.com supports CDO.Message. > >[snip] > >Try this; watch for word-wrap. > >The Response.Write() statement invokes the function; >modify it to suit your needs. Just call the function by >passing in 3 parms: email address, subject, and body. > >The value of "cHST" (Host) is what GoDaddy requires. >The value of "cFRM" (From) is your email address. > >Suucess/failure reporting has been commented out as >you may want to log the results rather than display them. > ><%@ Language="VBScript" %> ><% Option Explicit > >Response.Write("Email = " & Email("n***@mckirahan.com","Test","Test!")) > >Function Email(sAddr,sSubj,sBody) > Email = False > On Error Resume Next > '* > '* Declare Constants > '* > Const cCDO = "http://schemas.microsoft.com/cdo/configuration/" > Const cHST = "relay-hosting.secureserver.net" > Const cFRM = "postmaster@{your~domain.com}" > '* > '* Send Email > '* > Dim objCFG > Set objCFG = Server.CreateObject("CDO.Configuration") > objCFG.Fields.Item(cCDO & "sendusing") = 2 > objCFG.Fields.Item(cCDO & "smtpserver") = cHST > objCFG.Fields.Item(cCDO & "smtpserverport") = 25 > objCFG.Fields.Update > Dim objCDO > Set objCDO = Server.CreateObject("CDO.Message") > objCDO.From = cFRM > objCDO.To = sAddr > 'objCDO.BCC = "" > 'objCDO.CC = "" > objCDO.Subject = sSubj > objCDO.TextBody = sBody > 'objCDO.HTMLBody = sBody > 'objCDO.AddAttachment = "" > objCDO.Configuration = objCFG > objCDO.Send >' If Err = 0 Then >' Response.Write("<br><br><b>E-mail has been sent.</b>") >' Else >' Response.Write("<br><b>Sub Email()</b>") >' Response.Write("<br><b>CDO Failed:</b> " & Err.Description) >' Response.Write("<br><b>CDO 'Addr':</b> " & sAddr) >' Response.Write("<br><b>CDO 'Subj':</b> " & sSubj) >' Response.Write("<br><b>CDO 'Body':</b> " & sBody) >' End If > Set objCDO = Nothing > Set objCFG = Nothing > '* > '* Return > '* > On Error GoTo 0 > Email = True >End Function >%> "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798d65d0832f8@uwe...> McKirahan, [snip]> > Before I do this, where do I put all of this text? That has been one of the > things that is unclear to me. Do I put it next to the like where the save- > button is in the html, or what? Thanks so much again! You're original post included the following statement: >When I click "save" after adding a new record ... What is the ASP logic behind your save button.After the "save" call the "Email()" function. You do know something about ASP don't you? All ASP code is between <% and %> tags unless it's "included". Hey majahops,
Why didn't you say you were using GoDaddy? I've created 3 different email forms on 3 different sites using GoDaddy. The text will go before your <html> tag in your web page. Remember to name it with the ".asp" extension - not a ".htm" or ".html" extension! The code before the <html> tag will be read by the server, and will not appear in the Client's browser when he views the source for your page. I'll be happy to email you an example, if you'd like. Just shoot me an email using my contact form on my crappy website: http://www.joeswelding.biz/ It needs a re-design to make it less bandwidth intensive, but I am getting lots of experience with Classic ASP on parts of it. Show quoteHide quote "majahops via WebmasterKB.com" wrote: > McKirahan, > > Before I do this, where do I put all of this text? That has been one of > the > things that is unclear to me. Do I put it next to the like where the save- > button is in the html, or what? Thanks so much again! > Joe, thanks so much! The only question I have really is how do I call the
specific email that I have in the persons record that I am clicking save for? Thanks again. jp2code wrote: Show quoteHide quote >Hey majahops, > >Why didn't you say you were using GoDaddy? I've created 3 different email >forms on 3 different sites using GoDaddy. > >The text will go before your <html> tag in your web page. Remember to name >it with the ".asp" extension - not a ".htm" or ".html" extension! > >The code before the <html> tag will be read by the server, and will not >appear in the Client's browser when he views the source for your page. > >I'll be happy to email you an example, if you'd like. Just shoot me an email >using my contact form on my crappy website: >http://www.joeswelding.biz/ >It needs a re-design to make it less bandwidth intensive, but I am getting >lots of experience with Classic ASP on parts of it. > >> McKirahan, >> >> Before I do this, where do I put all of this text? That has been one of >> the >> things that is unclear to me. Do I put it next to the like where the save- >> button is in the html, or what? Thanks so much again! Here is the area of html around the save button (plus some more)...where
would i put the part you gave me into this? Thanks so much again!!! <TD class=shade style="BACKGROUND-COLOR: #e6e6fa" width=172> <P align=right>SPID</P></TD> <TD width=240>{build_edit_control field="SPID" mode="add" value= $value_SPID} </TD></TR> <TR height=50> <TD style="BACKGROUND-COLOR: #e6e6fa" align=middle width=414 colSpan=2><INPUT class=button id=submit1 type=submit value=Save name=submit1> <INPUT class=button type=reset value=Reset> <input type=hidden name="a" value="added"></TD></TR></FORM><!-- legend --> <TR height=50> <TD style="BACKGROUND-COLOR: #e6e6fa" align=left width=414 colSpan=2> <HR width=400 noShade SIZE=1> <BR><IMG src="images/icon_required.gif"> - Required field </TD></TR></TBODY></TABLE>{include_if_exists file="include/footer.asp"} { $linkdata}<script>SetToFirstControl();</script></BODY></HTML> McKirahan wrote: Show quoteHide quote >> First off, thank you SO much for responding - it mean's a lot to me - i've >> been trying to get this done forever. >[quoted text clipped - 5 lines] >> >> I'm assuming that means that godaddy.com supports CDO.Message. > >[snip] > >Try this; watch for word-wrap. > >The Response.Write() statement invokes the function; >modify it to suit your needs. Just call the function by >passing in 3 parms: email address, subject, and body. > >The value of "cHST" (Host) is what GoDaddy requires. >The value of "cFRM" (From) is your email address. > >Suucess/failure reporting has been commented out as >you may want to log the results rather than display them. > ><%@ Language="VBScript" %> ><% Option Explicit > >Response.Write("Email = " & Email("n***@mckirahan.com","Test","Test!")) > >Function Email(sAddr,sSubj,sBody) > Email = False > On Error Resume Next > '* > '* Declare Constants > '* > Const cCDO = "http://schemas.microsoft.com/cdo/configuration/" > Const cHST = "relay-hosting.secureserver.net" > Const cFRM = "postmaster@{your~domain.com}" > '* > '* Send Email > '* > Dim objCFG > Set objCFG = Server.CreateObject("CDO.Configuration") > objCFG.Fields.Item(cCDO & "sendusing") = 2 > objCFG.Fields.Item(cCDO & "smtpserver") = cHST > objCFG.Fields.Item(cCDO & "smtpserverport") = 25 > objCFG.Fields.Update > Dim objCDO > Set objCDO = Server.CreateObject("CDO.Message") > objCDO.From = cFRM > objCDO.To = sAddr > 'objCDO.BCC = "" > 'objCDO.CC = "" > objCDO.Subject = sSubj > objCDO.TextBody = sBody > 'objCDO.HTMLBody = sBody > 'objCDO.AddAttachment = "" > objCDO.Configuration = objCFG > objCDO.Send >' If Err = 0 Then >' Response.Write("<br><br><b>E-mail has been sent.</b>") >' Else >' Response.Write("<br><b>Sub Email()</b>") >' Response.Write("<br><b>CDO Failed:</b> " & Err.Description) >' Response.Write("<br><b>CDO 'Addr':</b> " & sAddr) >' Response.Write("<br><b>CDO 'Subj':</b> " & sSubj) >' Response.Write("<br><b>CDO 'Body':</b> " & sBody) >' End If > Set objCDO = Nothing > Set objCFG = Nothing > '* > '* Return > '* > On Error GoTo 0 > Email = True >End Function >%> "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798d6cf71f578@uwe...> Here is the area of html around the save button (plus some more)...where name=submit1>> would i put the part you gave me into this? Thanks so much again!!! > > <TD class=shade style="BACKGROUND-COLOR: #e6e6fa" width=172> > <P align=right>SPID</P></TD> > <TD width=240>{build_edit_control field="SPID" mode="add" value= > $value_SPID} </TD></TR> > <TR height=50> > <TD style="BACKGROUND-COLOR: #e6e6fa" align=middle width=414 > colSpan=2><INPUT class=button id=submit1 type=submit value=Save > Where's your ASP code?> <INPUT class=button type=reset value=Reset> <input type=hidden name="a" > value="added"></TD></TR></FORM><!-- legend --> > <TR height=50> > <TD style="BACKGROUND-COLOR: #e6e6fa" align=left width=414 colSpan=2> > <HR width=400 noShade SIZE=1> > <BR><IMG src="images/icon_required.gif"> - Required field > </TD></TR></TBODY></TABLE>{include_if_exists file="include/footer.asp"} { > $linkdata}<script>SetToFirstControl();</script></BODY></HTML> Sorry about that, here is the asp for that "Add doctor" page: Thank you again!
<!--#include file="include/dbcommon.asp"--> <!--#include file="include/Doctors_variables.asp"--> <!--#include file="libs/smarty.asp"--> <% Set myRequest = CreateObject("Scripting.Dictionary") Set myRequestFiles = CreateObject("Scripting.Dictionary") if ParseMultiPartForm()=true then parse=1 MaxSizeSet=false '// check if logged in if SESSION("UserID")="" or not CheckSecurity(SESSION("_" & strTableName & "_OwnerID"),"Add") then SESSION("MyURL")=request.ServerVariables("SCRIPT_NAME")&"?"&request. ServerVariables("QUERY_STRING") response.Redirect "login.asp?message=expired" response.End end if filename="" message="" readavalues=false errorhappened=false '//connect database dbConnection="" db_connect() Set rs = server.CreateObject("ADODB.Recordset") '// insert new record if we have to if getRequestForm("a")="added" then set afilename_values = CreateObject("Scripting.Dictionary") set avalues = CreateObject("Scripting.Dictionary") set files_move = CreateObject("Scripting.Dictionary") dim toadd dim thumb '// processing LastName - start value = postvalue("value_LastName") ttype=postvalue("type_LastName") toadd=true if myRequest.Exists("value_LastName") or myRequest.Exists("value_LastName[]") or myRequest.Exists("type_LastName") then value=prepare_for_db("LastName",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("LastName")=value end if end if ' processibng LastName - end '// processing FirstName - start value = postvalue("value_FirstName") ttype=postvalue("type_FirstName") toadd=true if myRequest.Exists("value_FirstName") or myRequest.Exists("value_FirstName[] ") or myRequest.Exists("type_FirstName") then value=prepare_for_db("FirstName",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("FirstName")=value end if end if ' processibng FirstName - end '// processing Phone - start value = postvalue("value_Phone") ttype=postvalue("type_Phone") toadd=true if myRequest.Exists("value_Phone") or myRequest.Exists("value_Phone[]") or myRequest.Exists("type_Phone") then value=prepare_for_db("Phone",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("Phone")=value end if end if ' processibng Phone - end '// processing Email - start value = postvalue("value_Email") ttype=postvalue("type_Email") toadd=true if myRequest.Exists("value_Email") or myRequest.Exists("value_Email[]") or myRequest.Exists("type_Email") then value=prepare_for_db("Email",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("Email")=value end if end if ' processibng Email - end '// processing Specialty - start value = postvalue("value_Specialty") ttype=postvalue("type_Specialty") toadd=true if myRequest.Exists("value_Specialty") or myRequest.Exists("value_Specialty[] ") or myRequest.Exists("type_Specialty") then value=prepare_for_db("Specialty",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("Specialty")=value end if end if ' processibng Specialty - end '// processing WaitingRoom - start value = postvalue("value_WaitingRoom") ttype=postvalue("type_WaitingRoom") toadd=true if myRequest.Exists("value_WaitingRoom") or myRequest.Exists ("value_WaitingRoom[]") or myRequest.Exists("type_WaitingRoom") then value=prepare_for_db("WaitingRoom",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("WaitingRoom")=value end if end if ' processibng WaitingRoom - end '// processing ConsentSent - start value = postvalue("value_ConsentSent") ttype=postvalue("type_ConsentSent") toadd=true if myRequest.Exists("value_ConsentSent") or myRequest.Exists ("value_ConsentSent[]") or myRequest.Exists("type_ConsentSent") then value=prepare_for_db("ConsentSent",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSent")=value end if end if ' processibng ConsentSent - end '// processing ConsentSentVia-1 - start value = postvalue("value_ConsentSentVia_1") ttype=postvalue("type_ConsentSentVia_1") toadd=true if myRequest.Exists("value_ConsentSentVia_1") or myRequest.Exists ("value_ConsentSentVia_1[]") or myRequest.Exists("type_ConsentSentVia_1") then value=prepare_for_db("ConsentSentVia-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentVia-1")=value end if end if ' processibng ConsentSentVia-1 - end '// processing ConsentSentDate-1 - start value = postvalue("value_ConsentSentDate_1") ttype=postvalue("type_ConsentSentDate_1") toadd=true if myRequest.Exists("value_ConsentSentDate_1") or myRequest.Exists ("value_ConsentSentDate_1[]") or myRequest.Exists("type_ConsentSentDate_1") then value=prepare_for_db("ConsentSentDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentDate-1")=value end if end if ' processibng ConsentSentDate-1 - end '// processing ConsentSent2 - start value = postvalue("value_ConsentSent2") ttype=postvalue("type_ConsentSent2") toadd=true if myRequest.Exists("value_ConsentSent2") or myRequest.Exists ("value_ConsentSent2[]") or myRequest.Exists("type_ConsentSent2") then value=prepare_for_db("ConsentSent2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSent2")=value end if end if ' processibng ConsentSent2 - end '// processing ConsentSentVia-2 - start value = postvalue("value_ConsentSentVia_2") ttype=postvalue("type_ConsentSentVia_2") toadd=true if myRequest.Exists("value_ConsentSentVia_2") or myRequest.Exists ("value_ConsentSentVia_2[]") or myRequest.Exists("type_ConsentSentVia_2") then value=prepare_for_db("ConsentSentVia-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentVia-2")=value end if end if ' processibng ConsentSentVia-2 - end '// processing ConsentSentDate-2 - start value = postvalue("value_ConsentSentDate_2") ttype=postvalue("type_ConsentSentDate_2") toadd=true if myRequest.Exists("value_ConsentSentDate_2") or myRequest.Exists ("value_ConsentSentDate_2[]") or myRequest.Exists("type_ConsentSentDate_2") then value=prepare_for_db("ConsentSentDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentDate-2")=value end if end if ' processibng ConsentSentDate-2 - end '// processing ConsentSent3 - start value = postvalue("value_ConsentSent3") ttype=postvalue("type_ConsentSent3") toadd=true if myRequest.Exists("value_ConsentSent3") or myRequest.Exists ("value_ConsentSent3[]") or myRequest.Exists("type_ConsentSent3") then value=prepare_for_db("ConsentSent3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSent3")=value end if end if ' processibng ConsentSent3 - end '// processing ConsentSentVia-3 - start value = postvalue("value_ConsentSentVia_3") ttype=postvalue("type_ConsentSentVia_3") toadd=true if myRequest.Exists("value_ConsentSentVia_3") or myRequest.Exists ("value_ConsentSentVia_3[]") or myRequest.Exists("type_ConsentSentVia_3") then value=prepare_for_db("ConsentSentVia-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentVia-3")=value end if end if ' processibng ConsentSentVia-3 - end '// processing ConsentSentDate-3 - start value = postvalue("value_ConsentSentDate_3") ttype=postvalue("type_ConsentSentDate_3") toadd=true if myRequest.Exists("value_ConsentSentDate_3") or myRequest.Exists ("value_ConsentSentDate_3[]") or myRequest.Exists("type_ConsentSentDate_3") then value=prepare_for_db("ConsentSentDate-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentSentDate-3")=value end if end if ' processibng ConsentSentDate-3 - end '// processing ConsentReturned - start value = postvalue("value_ConsentReturned") ttype=postvalue("type_ConsentReturned") toadd=true if myRequest.Exists("value_ConsentReturned") or myRequest.Exists ("value_ConsentReturned[]") or myRequest.Exists("type_ConsentReturned") then value=prepare_for_db("ConsentReturned",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentReturned")=value end if end if ' processibng ConsentReturned - end '// processing ConsentReturnedVia - start value = postvalue("value_ConsentReturnedVia") ttype=postvalue("type_ConsentReturnedVia") toadd=true if myRequest.Exists("value_ConsentReturnedVia") or myRequest.Exists ("value_ConsentReturnedVia[]") or myRequest.Exists("type_ConsentReturnedVia") then value=prepare_for_db("ConsentReturnedVia",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentReturnedVia")=value end if end if ' processibng ConsentReturnedVia - end '// processing ConsentReturnedDate - start value = postvalue("value_ConsentReturnedDate") ttype=postvalue("type_ConsentReturnedDate") toadd=true if myRequest.Exists("value_ConsentReturnedDate") or myRequest.Exists ("value_ConsentReturnedDate[]") or myRequest.Exists ("type_ConsentReturnedDate") then value=prepare_for_db("ConsentReturnedDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ConsentReturnedDate")=value end if end if ' processibng ConsentReturnedDate - end '// processing QaireEmailed - start value = postvalue("value_QaireEmailed") ttype=postvalue("type_QaireEmailed") toadd=true if myRequest.Exists("value_QaireEmailed") or myRequest.Exists ("value_QaireEmailed[]") or myRequest.Exists("type_QaireEmailed") then value=prepare_for_db("QaireEmailed",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireEmailed")=value end if end if ' processibng QaireEmailed - end '// processing QaireEmailDate - start value = postvalue("value_QaireEmailDate") ttype=postvalue("type_QaireEmailDate") toadd=true if myRequest.Exists("value_QaireEmailDate") or myRequest.Exists ("value_QaireEmailDate[]") or myRequest.Exists("type_QaireEmailDate") then value=prepare_for_db("QaireEmailDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireEmailDate")=value end if end if ' processibng QaireEmailDate - end '// processing QaireEmailed2 - start value = postvalue("value_QaireEmailed2") ttype=postvalue("type_QaireEmailed2") toadd=true if myRequest.Exists("value_QaireEmailed2") or myRequest.Exists ("value_QaireEmailed2[]") or myRequest.Exists("type_QaireEmailed2") then value=prepare_for_db("QaireEmailed2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireEmailed2")=value end if end if ' processibng QaireEmailed2 - end '// processing QaireEmailDate2 - start value = postvalue("value_QaireEmailDate2") ttype=postvalue("type_QaireEmailDate2") toadd=true if myRequest.Exists("value_QaireEmailDate2") or myRequest.Exists ("value_QaireEmailDate2[]") or myRequest.Exists("type_QaireEmailDate2") then value=prepare_for_db("QaireEmailDate2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireEmailDate2")=value end if end if ' processibng QaireEmailDate2 - end '// processing QaireCompleted - start value = postvalue("value_QaireCompleted") ttype=postvalue("type_QaireCompleted") toadd=true if myRequest.Exists("value_QaireCompleted") or myRequest.Exists ("value_QaireCompleted[]") or myRequest.Exists("type_QaireCompleted") then value=prepare_for_db("QaireCompleted",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireCompleted")=value end if end if ' processibng QaireCompleted - end '// processing QaireCompleteDate - start value = postvalue("value_QaireCompleteDate") ttype=postvalue("type_QaireCompleteDate") toadd=true if myRequest.Exists("value_QaireCompleteDate") or myRequest.Exists ("value_QaireCompleteDate[]") or myRequest.Exists("type_QaireCompleteDate") then value=prepare_for_db("QaireCompleteDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("QaireCompleteDate")=value end if end if ' processibng QaireCompleteDate - end '// processing PtListPulled1 - start value = postvalue("value_PtListPulled1") ttype=postvalue("type_PtListPulled1") toadd=true if myRequest.Exists("value_PtListPulled1") or myRequest.Exists ("value_PtListPulled1[]") or myRequest.Exists("type_PtListPulled1") then value=prepare_for_db("PtListPulled1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListPulled1")=value end if end if ' processibng PtListPulled1 - end '// processing PtListN-1 - start value = postvalue("value_PtListN_1") ttype=postvalue("type_PtListN_1") toadd=true if myRequest.Exists("value_PtListN_1") or myRequest.Exists("value_PtListN_1[] ") or myRequest.Exists("type_PtListN_1") then value=prepare_for_db("PtListN-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListN-1")=value end if end if ' processibng PtListN-1 - end '// processing PtListSent - start value = postvalue("value_PtListSent") ttype=postvalue("type_PtListSent") toadd=true if myRequest.Exists("value_PtListSent") or myRequest.Exists("value_PtListSent []") or myRequest.Exists("type_PtListSent") then value=prepare_for_db("PtListSent",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListSent")=value end if end if ' processibng PtListSent - end '// processing PtListSentDate-1 - start value = postvalue("value_PtListSentDate_1") ttype=postvalue("type_PtListSentDate_1") toadd=true if myRequest.Exists("value_PtListSentDate_1") or myRequest.Exists ("value_PtListSentDate_1[]") or myRequest.Exists("type_PtListSentDate_1") then value=prepare_for_db("PtListSentDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListSentDate-1")=value end if end if ' processibng PtListSentDate-1 - end '// processing PtListRemindSent - start value = postvalue("value_PtListRemindSent") ttype=postvalue("type_PtListRemindSent") toadd=true if myRequest.Exists("value_PtListRemindSent") or myRequest.Exists ("value_PtListRemindSent[]") or myRequest.Exists("type_PtListRemindSent") then value=prepare_for_db("PtListRemindSent",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindSent")=value end if end if ' processibng PtListRemindSent - end '// processing PtListRemindVia - start value = postvalue("value_PtListRemindVia") ttype=postvalue("type_PtListRemindVia") toadd=true if myRequest.Exists("value_PtListRemindVia") or myRequest.Exists ("value_PtListRemindVia[]") or myRequest.Exists("type_PtListRemindVia") then value=prepare_for_db("PtListRemindVia",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindVia")=value end if end if ' processibng PtListRemindVia - end '// processing PtListRemindDate-1 - start value = postvalue("value_PtListRemindDate_1") ttype=postvalue("type_PtListRemindDate_1") toadd=true if myRequest.Exists("value_PtListRemindDate_1") or myRequest.Exists ("value_PtListRemindDate_1[]") or myRequest.Exists("type_PtListRemindDate_1") then value=prepare_for_db("PtListRemindDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindDate-1")=value end if end if ' processibng PtListRemindDate-1 - end '// processing PtListReturned - start value = postvalue("value_PtListReturned") ttype=postvalue("type_PtListReturned") toadd=true if myRequest.Exists("value_PtListReturned") or myRequest.Exists ("value_PtListReturned[]") or myRequest.Exists("type_PtListReturned") then value=prepare_for_db("PtListReturned",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListReturned")=value end if end if ' processibng PtListReturned - end '// processing PtListReturnDate-1 - start value = postvalue("value_PtListReturnDate_1") ttype=postvalue("type_PtListReturnDate_1") toadd=true if myRequest.Exists("value_PtListReturnDate_1") or myRequest.Exists ("value_PtListReturnDate_1[]") or myRequest.Exists("type_PtListReturnDate_1") then value=prepare_for_db("PtListReturnDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListReturnDate-1")=value end if end if ' processibng PtListReturnDate-1 - end '// processing PtLetterMailed - start value = postvalue("value_PtLetterMailed") ttype=postvalue("type_PtLetterMailed") toadd=true if myRequest.Exists("value_PtLetterMailed") or myRequest.Exists ("value_PtLetterMailed[]") or myRequest.Exists("type_PtLetterMailed") then value=prepare_for_db("PtLetterMailed",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtLetterMailed")=value end if end if ' processibng PtLetterMailed - end '// processing PtLetterMailDate-1 - start value = postvalue("value_PtLetterMailDate_1") ttype=postvalue("type_PtLetterMailDate_1") toadd=true if myRequest.Exists("value_PtLetterMailDate_1") or myRequest.Exists ("value_PtLetterMailDate_1[]") or myRequest.Exists("type_PtLetterMailDate_1") then value=prepare_for_db("PtLetterMailDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtLetterMailDate-1")=value end if end if ' processibng PtLetterMailDate-1 - end '// processing PtListSentDate-2 - start value = postvalue("value_PtListSentDate_2") ttype=postvalue("type_PtListSentDate_2") toadd=true if myRequest.Exists("value_PtListSentDate_2") or myRequest.Exists ("value_PtListSentDate_2[]") or myRequest.Exists("type_PtListSentDate_2") then value=prepare_for_db("PtListSentDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListSentDate-2")=value end if end if ' processibng PtListSentDate-2 - end '// processing PtListRemindVia-2 - start value = postvalue("value_PtListRemindVia_2") ttype=postvalue("type_PtListRemindVia_2") toadd=true if myRequest.Exists("value_PtListRemindVia_2") or myRequest.Exists ("value_PtListRemindVia_2[]") or myRequest.Exists("type_PtListRemindVia_2") then value=prepare_for_db("PtListRemindVia-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindVia-2")=value end if end if ' processibng PtListRemindVia-2 - end '// processing PtListRemindDate-2 - start value = postvalue("value_PtListRemindDate_2") ttype=postvalue("type_PtListRemindDate_2") toadd=true if myRequest.Exists("value_PtListRemindDate_2") or myRequest.Exists ("value_PtListRemindDate_2[]") or myRequest.Exists("type_PtListRemindDate_2") then value=prepare_for_db("PtListRemindDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindDate-2")=value end if end if ' processibng PtListRemindDate-2 - end '// processing PtListReturnDate-2 - start value = postvalue("value_PtListReturnDate_2") ttype=postvalue("type_PtListReturnDate_2") toadd=true if myRequest.Exists("value_PtListReturnDate_2") or myRequest.Exists ("value_PtListReturnDate_2[]") or myRequest.Exists("type_PtListReturnDate_2") then value=prepare_for_db("PtListReturnDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListReturnDate-2")=value end if end if ' processibng PtListReturnDate-2 - end '// processing PtLetterMailDate-2 - start value = postvalue("value_PtLetterMailDate_2") ttype=postvalue("type_PtLetterMailDate_2") toadd=true if myRequest.Exists("value_PtLetterMailDate_2") or myRequest.Exists ("value_PtLetterMailDate_2[]") or myRequest.Exists("type_PtLetterMailDate_2") then value=prepare_for_db("PtLetterMailDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtLetterMailDate-2")=value end if end if ' processibng PtLetterMailDate-2 - end '// processing PtListSentDate-3 - start value = postvalue("value_PtListSentDate_3") ttype=postvalue("type_PtListSentDate_3") toadd=true if myRequest.Exists("value_PtListSentDate_3") or myRequest.Exists ("value_PtListSentDate_3[]") or myRequest.Exists("type_PtListSentDate_3") then value=prepare_for_db("PtListSentDate-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListSentDate-3")=value end if end if ' processibng PtListSentDate-3 - end '// processing PtListRemindVia-3 - start value = postvalue("value_PtListRemindVia_3") ttype=postvalue("type_PtListRemindVia_3") toadd=true if myRequest.Exists("value_PtListRemindVia_3") or myRequest.Exists ("value_PtListRemindVia_3[]") or myRequest.Exists("type_PtListRemindVia_3") then value=prepare_for_db("PtListRemindVia-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindVia-3")=value end if end if ' processibng PtListRemindVia-3 - end '// processing PtListRemindDate-3 - start value = postvalue("value_PtListRemindDate_3") ttype=postvalue("type_PtListRemindDate_3") toadd=true if myRequest.Exists("value_PtListRemindDate_3") or myRequest.Exists ("value_PtListRemindDate_3[]") or myRequest.Exists("type_PtListRemindDate_3") then value=prepare_for_db("PtListRemindDate-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListRemindDate-3")=value end if end if ' processibng PtListRemindDate-3 - end '// processing PtListReturnDate-3 - start value = postvalue("value_PtListReturnDate_3") ttype=postvalue("type_PtListReturnDate_3") toadd=true if myRequest.Exists("value_PtListReturnDate_3") or myRequest.Exists ("value_PtListReturnDate_3[]") or myRequest.Exists("type_PtListReturnDate_3") then value=prepare_for_db("PtListReturnDate-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtListReturnDate-3")=value end if end if ' processibng PtListReturnDate-3 - end '// processing PtLetterMailDate-3 - start value = postvalue("value_PtLetterMailDate_3") ttype=postvalue("type_PtLetterMailDate_3") toadd=true if myRequest.Exists("value_PtLetterMailDate_3") or myRequest.Exists ("value_PtLetterMailDate_3[]") or myRequest.Exists("type_PtLetterMailDate_3") then value=prepare_for_db("PtLetterMailDate-3",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PtLetterMailDate-3")=value end if end if ' processibng PtLetterMailDate-3 - end '// processing EdocInviteSent - start value = postvalue("value_EdocInviteSent") ttype=postvalue("type_EdocInviteSent") toadd=true if myRequest.Exists("value_EdocInviteSent") or myRequest.Exists ("value_EdocInviteSent[]") or myRequest.Exists("type_EdocInviteSent") then value=prepare_for_db("EdocInviteSent",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("EdocInviteSent")=value end if end if ' processibng EdocInviteSent - end '// processing EdocInviteDate-1 - start value = postvalue("value_EdocInviteDate_1") ttype=postvalue("type_EdocInviteDate_1") toadd=true if myRequest.Exists("value_EdocInviteDate_1") or myRequest.Exists ("value_EdocInviteDate_1[]") or myRequest.Exists("type_EdocInviteDate_1") then value=prepare_for_db("EdocInviteDate-1",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("EdocInviteDate-1")=value end if end if ' processibng EdocInviteDate-1 - end '// processing EdocInviteDate-2 - start value = postvalue("value_EdocInviteDate_2") ttype=postvalue("type_EdocInviteDate_2") toadd=true if myRequest.Exists("value_EdocInviteDate_2") or myRequest.Exists ("value_EdocInviteDate_2[]") or myRequest.Exists("type_EdocInviteDate_2") then value=prepare_for_db("EdocInviteDate-2",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("EdocInviteDate-2")=value end if end if ' processibng EdocInviteDate-2 - end '// processing EdocDirectionsSentDate - start value = postvalue("value_EdocDirectionsSentDate") ttype=postvalue("type_EdocDirectionsSentDate") toadd=true if myRequest.Exists("value_EdocDirectionsSentDate") or myRequest.Exists ("value_EdocDirectionsSentDate[]") or myRequest.Exists ("type_EdocDirectionsSentDate") then value=prepare_for_db("EdocDirectionsSentDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("EdocDirectionsSentDate")=value end if end if ' processibng EdocDirectionsSentDate - end '// processing PenSent - start value = postvalue("value_PenSent") ttype=postvalue("type_PenSent") toadd=true if myRequest.Exists("value_PenSent") or myRequest.Exists("value_PenSent[]") or myRequest.Exists("type_PenSent") then value=prepare_for_db("PenSent",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PenSent")=value end if end if ' processibng PenSent - end '// processing PenSentDate - start value = postvalue("value_PenSentDate") ttype=postvalue("type_PenSentDate") toadd=true if myRequest.Exists("value_PenSentDate") or myRequest.Exists ("value_PenSentDate[]") or myRequest.Exists("type_PenSentDate") then value=prepare_for_db("PenSentDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("PenSentDate")=value end if end if ' processibng PenSentDate - end '// processing Withdrawl - start value = postvalue("value_Withdrawl") ttype=postvalue("type_Withdrawl") toadd=true if myRequest.Exists("value_Withdrawl") or myRequest.Exists("value_Withdrawl[] ") or myRequest.Exists("type_Withdrawl") then value=prepare_for_db("Withdrawl",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("Withdrawl")=value end if end if ' processibng Withdrawl - end '// processing WithdrawlDate - start value = postvalue("value_WithdrawlDate") ttype=postvalue("type_WithdrawlDate") toadd=true if myRequest.Exists("value_WithdrawlDate") or myRequest.Exists ("value_WithdrawlDate[]") or myRequest.Exists("type_WithdrawlDate") then value=prepare_for_db("WithdrawlDate",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("WithdrawlDate")=value end if end if ' processibng WithdrawlDate - end '// processing WithdrawlReason - start value = postvalue("value_WithdrawlReason") ttype=postvalue("type_WithdrawlReason") toadd=true if myRequest.Exists("value_WithdrawlReason") or myRequest.Exists ("value_WithdrawlReason[]") or myRequest.Exists("type_WithdrawlReason") then value=prepare_for_db("WithdrawlReason",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("WithdrawlReason")=value end if end if ' processibng WithdrawlReason - end '// processing Notes - start value = postvalue("value_Notes") ttype=postvalue("type_Notes") toadd=true if myRequest.Exists("value_Notes") or myRequest.Exists("value_Notes[]") or myRequest.Exists("type_Notes") then value=prepare_for_db("Notes",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("Notes")=value end if end if ' processibng Notes - end '// processing ClinicID - start value = postvalue("value_ClinicID") ttype=postvalue("type_ClinicID") toadd=true if myRequest.Exists("value_ClinicID") or myRequest.Exists("value_ClinicID[]") or myRequest.Exists("type_ClinicID") then value=prepare_for_db("ClinicID",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("ClinicID")=value end if end if ' processibng ClinicID - end '// processing SPID - start value = postvalue("value_SPID") ttype=postvalue("type_SPID") toadd=true if myRequest.Exists("value_SPID") or myRequest.Exists("value_SPID[]") or myRequest.Exists("type_SPID") then value=prepare_for_db("SPID",value,ttype,"") if vartype(value)=11 then if value=false then toadd=false end if if toadd then avalues("SPID")=value end if end if ' processibng SPID - end '// add filenames to values for each akey in afilename_values avalues(akey)=afilename_values(akey) next '// before Add event retval = true DoEvent "retval = BeforeAdd(avalues)" if retval then on error resume next rs.Open "select * from " & AddTableWrappers(strOriginalTableName) & " where 1=0", dbConnection, 1,2 rs.Addnew call report_error if IsUpdatable(rs("DoctorID")) then ' insert DoctorID field strValue=false if avalues.exists("DoctorID") then _ strValue = avalues.Item("DoctorID") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_DoctorID") if strValue<>"" and IsNumeric(strValue) then rs("DoctorID") = CLng(strValue) else rs("DoctorID") = null end if call report_error end if end if ' insert LastName field strValue=false if avalues.exists("LastName") then _ strValue = avalues.Item("LastName") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_LastName") rs("LastName") = strValue call report_error end if ' insert FirstName field strValue=false if avalues.exists("FirstName") then _ strValue = avalues.Item("FirstName") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_FirstName") rs("FirstName") = strValue call report_error end if ' insert Phone field strValue=false if avalues.exists("Phone") then _ strValue = avalues.Item("Phone") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Phone") rs("Phone") = strValue call report_error end if ' insert Email field strValue=false if avalues.exists("Email") then _ strValue = avalues.Item("Email") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Email") rs("Email") = strValue call report_error end if ' insert Specialty field strValue=false if avalues.exists("Specialty") then _ strValue = avalues.Item("Specialty") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Specialty") rs("Specialty") = strValue call report_error end if ' insert WaitingRoom field strValue=false if avalues.exists("WaitingRoom") then _ strValue = avalues.Item("WaitingRoom") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_WaitingRoom") rs("WaitingRoom") = strValue call report_error end if ' insert ConsentSent field strValue=false if avalues.exists("ConsentSent") then _ strValue = avalues.Item("ConsentSent") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSent") if strValue<>"" and IsNumeric(strValue) then rs("ConsentSent") = CLng(strValue) else rs("ConsentSent") = null end if call report_error end if ' insert ConsentSentVia-1 field strValue=false if avalues.exists("ConsentSentVia-1") then _ strValue = avalues.Item("ConsentSentVia-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentVia_1") rs("ConsentSentVia-1") = strValue call report_error end if ' insert ConsentSentDate-1 field strValue=false if avalues.exists("ConsentSentDate-1") then _ strValue = avalues.Item("ConsentSentDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentDate_1") if strValue="" then rs("ConsentSentDate-1")=null else rs("ConsentSentDate-1")=strValue end if call report_error end if ' insert ConsentSent2 field strValue=false if avalues.exists("ConsentSent2") then _ strValue = avalues.Item("ConsentSent2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSent2") if strValue<>"" and IsNumeric(strValue) then rs("ConsentSent2") = CLng(strValue) else rs("ConsentSent2") = null end if call report_error end if ' insert ConsentSentVia-2 field strValue=false if avalues.exists("ConsentSentVia-2") then _ strValue = avalues.Item("ConsentSentVia-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentVia_2") rs("ConsentSentVia-2") = strValue call report_error end if ' insert ConsentSentDate-2 field strValue=false if avalues.exists("ConsentSentDate-2") then _ strValue = avalues.Item("ConsentSentDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentDate_2") if strValue="" then rs("ConsentSentDate-2")=null else rs("ConsentSentDate-2")=strValue end if call report_error end if ' insert ConsentSent3 field strValue=false if avalues.exists("ConsentSent3") then _ strValue = avalues.Item("ConsentSent3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSent3") if strValue<>"" and IsNumeric(strValue) then rs("ConsentSent3") = CLng(strValue) else rs("ConsentSent3") = null end if call report_error end if ' insert ConsentSentVia-3 field strValue=false if avalues.exists("ConsentSentVia-3") then _ strValue = avalues.Item("ConsentSentVia-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentVia_3") rs("ConsentSentVia-3") = strValue call report_error end if ' insert ConsentSentDate-3 field strValue=false if avalues.exists("ConsentSentDate-3") then _ strValue = avalues.Item("ConsentSentDate-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentSentDate_3") rs("ConsentSentDate-3") = strValue call report_error end if ' insert ConsentReturned field strValue=false if avalues.exists("ConsentReturned") then _ strValue = avalues.Item("ConsentReturned") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentReturned") if strValue<>"" and IsNumeric(strValue) then rs("ConsentReturned") = CLng(strValue) else rs("ConsentReturned") = null end if call report_error end if ' insert ConsentReturnedVia field strValue=false if avalues.exists("ConsentReturnedVia") then _ strValue = avalues.Item("ConsentReturnedVia") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentReturnedVia") rs("ConsentReturnedVia") = strValue call report_error end if ' insert ConsentReturnedDate field strValue=false if avalues.exists("ConsentReturnedDate") then _ strValue = avalues.Item("ConsentReturnedDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ConsentReturnedDate") if strValue="" then rs("ConsentReturnedDate")=null else rs("ConsentReturnedDate")=strValue end if call report_error end if ' insert QaireEmailed field strValue=false if avalues.exists("QaireEmailed") then _ strValue = avalues.Item("QaireEmailed") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireEmailed") if strValue<>"" and IsNumeric(strValue) then rs("QaireEmailed") = CLng(strValue) else rs("QaireEmailed") = null end if call report_error end if ' insert QaireEmailDate field strValue=false if avalues.exists("QaireEmailDate") then _ strValue = avalues.Item("QaireEmailDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireEmailDate") if strValue="" then rs("QaireEmailDate")=null else rs("QaireEmailDate")=strValue end if call report_error end if ' insert QaireEmailed2 field strValue=false if avalues.exists("QaireEmailed2") then _ strValue = avalues.Item("QaireEmailed2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireEmailed2") if strValue<>"" and IsNumeric(strValue) then rs("QaireEmailed2") = CLng(strValue) else rs("QaireEmailed2") = null end if call report_error end if ' insert QaireEmailDate2 field strValue=false if avalues.exists("QaireEmailDate2") then _ strValue = avalues.Item("QaireEmailDate2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireEmailDate2") if strValue="" then rs("QaireEmailDate2")=null else rs("QaireEmailDate2")=strValue end if call report_error end if ' insert QaireCompleted field strValue=false if avalues.exists("QaireCompleted") then _ strValue = avalues.Item("QaireCompleted") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireCompleted") if strValue<>"" and IsNumeric(strValue) then rs("QaireCompleted") = CLng(strValue) else rs("QaireCompleted") = null end if call report_error end if ' insert QaireCompleteDate field strValue=false if avalues.exists("QaireCompleteDate") then _ strValue = avalues.Item("QaireCompleteDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_QaireCompleteDate") if strValue="" then rs("QaireCompleteDate")=null else rs("QaireCompleteDate")=strValue end if call report_error end if ' insert PtListPulled1 field strValue=false if avalues.exists("PtListPulled1") then _ strValue = avalues.Item("PtListPulled1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListPulled1") if strValue<>"" and IsNumeric(strValue) then rs("PtListPulled1") = CLng(strValue) else rs("PtListPulled1") = null end if call report_error end if ' insert PtListN-1 field strValue=false if avalues.exists("PtListN-1") then _ strValue = avalues.Item("PtListN-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListN_1") rs("PtListN-1") = strValue call report_error end if ' insert PtListSent field strValue=false if avalues.exists("PtListSent") then _ strValue = avalues.Item("PtListSent") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListSent") if strValue<>"" and IsNumeric(strValue) then rs("PtListSent") = CLng(strValue) else rs("PtListSent") = null end if call report_error end if ' insert PtListSentDate-1 field strValue=false if avalues.exists("PtListSentDate-1") then _ strValue = avalues.Item("PtListSentDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListSentDate_1") if strValue="" then rs("PtListSentDate-1")=null else rs("PtListSentDate-1")=strValue end if call report_error end if ' insert PtListRemindSent field strValue=false if avalues.exists("PtListRemindSent") then _ strValue = avalues.Item("PtListRemindSent") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindSent") if strValue<>"" and IsNumeric(strValue) then rs("PtListRemindSent") = CLng(strValue) else rs("PtListRemindSent") = null end if call report_error end if ' insert PtListRemindVia field strValue=false if avalues.exists("PtListRemindVia") then _ strValue = avalues.Item("PtListRemindVia") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindVia") rs("PtListRemindVia") = strValue call report_error end if ' insert PtListRemindDate-1 field strValue=false if avalues.exists("PtListRemindDate-1") then _ strValue = avalues.Item("PtListRemindDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindDate_1") if strValue="" then rs("PtListRemindDate-1")=null else rs("PtListRemindDate-1")=strValue end if call report_error end if ' insert PtListReturned field strValue=false if avalues.exists("PtListReturned") then _ strValue = avalues.Item("PtListReturned") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListReturned") if strValue<>"" and IsNumeric(strValue) then rs("PtListReturned") = CLng(strValue) else rs("PtListReturned") = null end if call report_error end if ' insert PtListReturnDate-1 field strValue=false if avalues.exists("PtListReturnDate-1") then _ strValue = avalues.Item("PtListReturnDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListReturnDate_1") if strValue="" then rs("PtListReturnDate-1")=null else rs("PtListReturnDate-1")=strValue end if call report_error end if ' insert PtLetterMailed field strValue=false if avalues.exists("PtLetterMailed") then _ strValue = avalues.Item("PtLetterMailed") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtLetterMailed") if strValue<>"" and IsNumeric(strValue) then rs("PtLetterMailed") = CLng(strValue) else rs("PtLetterMailed") = null end if call report_error end if ' insert PtLetterMailDate-1 field strValue=false if avalues.exists("PtLetterMailDate-1") then _ strValue = avalues.Item("PtLetterMailDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtLetterMailDate_1") if strValue="" then rs("PtLetterMailDate-1")=null else rs("PtLetterMailDate-1")=strValue end if call report_error end if ' insert PtListSentDate-2 field strValue=false if avalues.exists("PtListSentDate-2") then _ strValue = avalues.Item("PtListSentDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListSentDate_2") if strValue="" then rs("PtListSentDate-2")=null else rs("PtListSentDate-2")=strValue end if call report_error end if ' insert PtListRemindVia-2 field strValue=false if avalues.exists("PtListRemindVia-2") then _ strValue = avalues.Item("PtListRemindVia-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindVia_2") rs("PtListRemindVia-2") = strValue call report_error end if ' insert PtListRemindDate-2 field strValue=false if avalues.exists("PtListRemindDate-2") then _ strValue = avalues.Item("PtListRemindDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindDate_2") if strValue="" then rs("PtListRemindDate-2")=null else rs("PtListRemindDate-2")=strValue end if call report_error end if ' insert PtListReturnDate-2 field strValue=false if avalues.exists("PtListReturnDate-2") then _ strValue = avalues.Item("PtListReturnDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListReturnDate_2") if strValue="" then rs("PtListReturnDate-2")=null else rs("PtListReturnDate-2")=strValue end if call report_error end if ' insert PtLetterMailDate-2 field strValue=false if avalues.exists("PtLetterMailDate-2") then _ strValue = avalues.Item("PtLetterMailDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtLetterMailDate_2") if strValue="" then rs("PtLetterMailDate-2")=null else rs("PtLetterMailDate-2")=strValue end if call report_error end if ' insert PtListSentDate-3 field strValue=false if avalues.exists("PtListSentDate-3") then _ strValue = avalues.Item("PtListSentDate-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListSentDate_3") if strValue="" then rs("PtListSentDate-3")=null else rs("PtListSentDate-3")=strValue end if call report_error end if ' insert PtListRemindVia-3 field strValue=false if avalues.exists("PtListRemindVia-3") then _ strValue = avalues.Item("PtListRemindVia-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindVia_3") rs("PtListRemindVia-3") = strValue call report_error end if ' insert PtListRemindDate-3 field strValue=false if avalues.exists("PtListRemindDate-3") then _ strValue = avalues.Item("PtListRemindDate-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListRemindDate_3") if strValue="" then rs("PtListRemindDate-3")=null else rs("PtListRemindDate-3")=strValue end if call report_error end if ' insert PtListReturnDate-3 field strValue=false if avalues.exists("PtListReturnDate-3") then _ strValue = avalues.Item("PtListReturnDate-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtListReturnDate_3") if strValue="" then rs("PtListReturnDate-3")=null else rs("PtListReturnDate-3")=strValue end if call report_error end if ' insert PtLetterMailDate-3 field strValue=false if avalues.exists("PtLetterMailDate-3") then _ strValue = avalues.Item("PtLetterMailDate-3") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PtLetterMailDate_3") if strValue="" then rs("PtLetterMailDate-3")=null else rs("PtLetterMailDate-3")=strValue end if call report_error end if ' insert EdocInviteSent field strValue=false if avalues.exists("EdocInviteSent") then _ strValue = avalues.Item("EdocInviteSent") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_EdocInviteSent") if strValue<>"" and IsNumeric(strValue) then rs("EdocInviteSent") = CLng(strValue) else rs("EdocInviteSent") = null end if call report_error end if ' insert EdocInviteDate-1 field strValue=false if avalues.exists("EdocInviteDate-1") then _ strValue = avalues.Item("EdocInviteDate-1") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_EdocInviteDate_1") if strValue="" then rs("EdocInviteDate-1")=null else rs("EdocInviteDate-1")=strValue end if call report_error end if ' insert EdocInviteDate-2 field strValue=false if avalues.exists("EdocInviteDate-2") then _ strValue = avalues.Item("EdocInviteDate-2") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_EdocInviteDate_2") if strValue="" then rs("EdocInviteDate-2")=null else rs("EdocInviteDate-2")=strValue end if call report_error end if ' insert EdocDirectionsSentDate field strValue=false if avalues.exists("EdocDirectionsSentDate") then _ strValue = avalues.Item("EdocDirectionsSentDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_EdocDirectionsSentDate") if strValue="" then rs("EdocDirectionsSentDate")=null else rs("EdocDirectionsSentDate")=strValue end if call report_error end if ' insert PenSent field strValue=false if avalues.exists("PenSent") then _ strValue = avalues.Item("PenSent") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PenSent") if strValue<>"" and IsNumeric(strValue) then rs("PenSent") = CLng(strValue) else rs("PenSent") = null end if call report_error end if ' insert PenSentDate field strValue=false if avalues.exists("PenSentDate") then _ strValue = avalues.Item("PenSentDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_PenSentDate") if strValue="" then rs("PenSentDate")=null else rs("PenSentDate")=strValue end if call report_error end if ' insert Withdrawl field strValue=false if avalues.exists("Withdrawl") then _ strValue = avalues.Item("Withdrawl") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Withdrawl") if strValue<>"" and IsNumeric(strValue) then rs("Withdrawl") = CLng(strValue) else rs("Withdrawl") = null end if call report_error end if ' insert WithdrawlDate field strValue=false if avalues.exists("WithdrawlDate") then _ strValue = avalues.Item("WithdrawlDate") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_WithdrawlDate") if strValue="" then rs("WithdrawlDate")=null else rs("WithdrawlDate")=strValue end if call report_error end if ' insert WithdrawlReason field strValue=false if avalues.exists("WithdrawlReason") then _ strValue = avalues.Item("WithdrawlReason") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_WithdrawlReason") rs("WithdrawlReason") = strValue call report_error end if ' insert Notes field strValue=false if avalues.exists("Notes") then _ strValue = avalues.Item("Notes") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Notes") rs("Notes") = strValue call report_error end if ' insert ClinicID field strValue=false if avalues.exists("ClinicID") then _ strValue = avalues.Item("ClinicID") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_ClinicID") rs("ClinicID") = strValue call report_error end if ' insert SPID field strValue=false if avalues.exists("SPID") then _ strValue = avalues.Item("SPID") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_SPID") if strValue<>"" and IsNumeric(strValue) then rs("SPID") = CLng(strValue) else rs("SPID") = null end if call report_error end if if not errorhappened then rs.Update call report_error end if on error goto 0 if not errorhappened then '// after add event DoEvent "AfterAdd()" message="<div class=message><<< " & "Record was added" & " >>></div>" end if else readavalues=true end if end if set defvalues = CreateObject("Scripting.Dictionary") set keys = CreateObject("Scripting.Dictionary") keys("DoctorID")=postvalue("copyid1") '// copy record if getRequestForm("copyid1")<>"" then sstrWhere=KeyWhere(keys,"") strSQL=gstrSQL strSQL=AddWhere(strSQL,sstrWhere) LogInfo(strSQL) rs.open strSQL,dbConnection, 1, 2 if not rs.EOF then defvalues("LastName")=dbvalue(rs("LastName")) defvalues("FirstName")=dbvalue(rs("FirstName")) defvalues("Phone")=dbvalue(rs("Phone")) defvalues("Email")=dbvalue(rs("Email")) defvalues("Specialty")=dbvalue(rs("Specialty")) defvalues("WaitingRoom")=dbvalue(rs("WaitingRoom")) defvalues("ConsentSent")=dbvalue(rs("ConsentSent")) defvalues("ConsentSentVia-1")=dbvalue(rs("ConsentSentVia-1")) defvalues("ConsentSentDate-1")=dbvalue(rs("ConsentSentDate-1")) defvalues("ConsentSent2")=dbvalue(rs("ConsentSent2")) defvalues("ConsentSentVia-2")=dbvalue(rs("ConsentSentVia-2")) defvalues("ConsentSentDate-2")=dbvalue(rs("ConsentSentDate-2")) defvalues("ConsentSent3")=dbvalue(rs("ConsentSent3")) defvalues("ConsentSentVia-3")=dbvalue(rs("ConsentSentVia-3")) defvalues("ConsentSentDate-3")=dbvalue(rs("ConsentSentDate-3")) defvalues("ConsentReturned")=dbvalue(rs("ConsentReturned")) defvalues("ConsentReturnedVia")=dbvalue(rs("ConsentReturnedVia")) defvalues("ConsentReturnedDate")=dbvalue(rs("ConsentReturnedDate")) defvalues("QaireEmailed")=dbvalue(rs("QaireEmailed")) defvalues("QaireEmailDate")=dbvalue(rs("QaireEmailDate")) defvalues("QaireEmailed2")=dbvalue(rs("QaireEmailed2")) defvalues("QaireEmailDate2")=dbvalue(rs("QaireEmailDate2")) defvalues("QaireCompleted")=dbvalue(rs("QaireCompleted")) defvalues("QaireCompleteDate")=dbvalue(rs("QaireCompleteDate")) defvalues("PtListPulled1")=dbvalue(rs("PtListPulled1")) defvalues("PtListN-1")=dbvalue(rs("PtListN-1")) defvalues("PtListSent")=dbvalue(rs("PtListSent")) defvalues("PtListSentDate-1")=dbvalue(rs("PtListSentDate-1")) defvalues("PtListRemindSent")=dbvalue(rs("PtListRemindSent")) defvalues("PtListRemindVia")=dbvalue(rs("PtListRemindVia")) defvalues("PtListRemindDate-1")=dbvalue(rs("PtListRemindDate-1")) defvalues("PtListReturned")=dbvalue(rs("PtListReturned")) defvalues("PtListReturnDate-1")=dbvalue(rs("PtListReturnDate-1")) defvalues("PtLetterMailed")=dbvalue(rs("PtLetterMailed")) defvalues("PtLetterMailDate-1")=dbvalue(rs("PtLetterMailDate-1")) defvalues("PtListSentDate-2")=dbvalue(rs("PtListSentDate-2")) defvalues("PtListRemindVia-2")=dbvalue(rs("PtListRemindVia-2")) defvalues("PtListRemindDate-2")=dbvalue(rs("PtListRemindDate-2")) defvalues("PtListReturnDate-2")=dbvalue(rs("PtListReturnDate-2")) defvalues("PtLetterMailDate-2")=dbvalue(rs("PtLetterMailDate-2")) defvalues("PtListSentDate-3")=dbvalue(rs("PtListSentDate-3")) defvalues("PtListRemindVia-3")=dbvalue(rs("PtListRemindVia-3")) defvalues("PtListRemindDate-3")=dbvalue(rs("PtListRemindDate-3")) defvalues("PtListReturnDate-3")=dbvalue(rs("PtListReturnDate-3")) defvalues("PtLetterMailDate-3")=dbvalue(rs("PtLetterMailDate-3")) defvalues("EdocInviteSent")=dbvalue(rs("EdocInviteSent")) defvalues("EdocInviteDate-1")=dbvalue(rs("EdocInviteDate-1")) defvalues("EdocInviteDate-2")=dbvalue(rs("EdocInviteDate-2")) defvalues("EdocDirectionsSentDate")=dbvalue(rs("EdocDirectionsSentDate")) defvalues("PenSent")=dbvalue(rs("PenSent")) defvalues("PenSentDate")=dbvalue(rs("PenSentDate")) defvalues("Withdrawl")=dbvalue(rs("Withdrawl")) defvalues("WithdrawlDate")=dbvalue(rs("WithdrawlDate")) defvalues("WithdrawlReason")=dbvalue(rs("WithdrawlReason")) defvalues("Notes")=dbvalue(rs("Notes")) defvalues("ClinicID")=dbvalue(rs("ClinicID")) defvalues("SPID")=dbvalue(rs("SPID")) end if '// clear key fields defvalues("DoctorID")="" '//call CopyOnLoad event DoEvent "Call CopyOnLoad(defvalues,sstrWhere)" else defvalues("ConsentSentVia-1")="email" defvalues("ConsentSentDate-1")="N/A" defvalues("ConsentSentVia-2")="email" defvalues("ConsentSentDate-2")="N/A" defvalues("ConsentSentVia-3")="email" defvalues("ConsentSentDate-3")="N/A" defvalues("ConsentReturnedDate")="N/A" defvalues("QaireEmailDate")="N/A" defvalues("QaireEmailDate2")="N/A" defvalues("QaireCompleteDate")="N/A" defvalues("PtListSentDate-1")="N/A" defvalues("PtListReturnDate-1")="N/A" defvalues("PtLetterMailDate-1")="N/A" defvalues("PtListSentDate-2")="N/A" defvalues("PtListReturnDate-2")="N/A" defvalues("EdocInviteDate-1")="N/A" defvalues("EdocInviteDate-2")="N/A" defvalues("EdocDirectionsSentDate")="N/A" defvalues("PenSentDate")="N/A" defvalues("WithdrawlDate")="N/A" end if ' save previously enterd values if readavalues then if avalues.exists("LastName") then defvalues("LastName")= avalues("LastName") end if if avalues.exists("FirstName") then defvalues("FirstName")= avalues("FirstName") end if if avalues.exists("Phone") then defvalues("Phone")= avalues("Phone") end if if avalues.exists("Email") then defvalues("Email")= avalues("Email") end if if avalues.exists("Specialty") then defvalues("Specialty")= avalues("Specialty") end if if avalues.exists("WaitingRoom") then defvalues("WaitingRoom")= avalues("WaitingRoom") end if if avalues.exists("ConsentSent") then defvalues("ConsentSent")= avalues("ConsentSent") end if if avalues.exists("ConsentSentVia-1") then defvalues("ConsentSentVia-1")= avalues("ConsentSentVia-1") end if if avalues.exists("ConsentSentDate-1") then defvalues("ConsentSentDate-1")= avalues("ConsentSentDate-1") end if if avalues.exists("ConsentSent2") then defvalues("ConsentSent2")= avalues("ConsentSent2") end if if avalues.exists("ConsentSentVia-2") then defvalues("ConsentSentVia-2")= avalues("ConsentSentVia-2") end if if avalues.exists("ConsentSentDate-2") then defvalues("ConsentSentDate-2")= avalues("ConsentSentDate-2") end if if avalues.exists("ConsentSent3") then defvalues("ConsentSent3")= avalues("ConsentSent3") end if if avalues.exists("ConsentSentVia-3") then defvalues("ConsentSentVia-3")= avalues("ConsentSentVia-3") end if if avalues.exists("ConsentSentDate-3") then defvalues("ConsentSentDate-3")= avalues("ConsentSentDate-3") end if if avalues.exists("ConsentReturned") then defvalues("ConsentReturned")= avalues("ConsentReturned") end if if avalues.exists("ConsentReturnedVia") then defvalues("ConsentReturnedVia")= avalues("ConsentReturnedVia") end if if avalues.exists("ConsentReturnedDate") then defvalues("ConsentReturnedDate")= avalues("ConsentReturnedDate") end if if avalues.exists("QaireEmailed") then defvalues("QaireEmailed")= avalues("QaireEmailed") end if if avalues.exists("QaireEmailDate") then defvalues("QaireEmailDate")= avalues("QaireEmailDate") end if if avalues.exists("QaireEmailed2") then defvalues("QaireEmailed2")= avalues("QaireEmailed2") end if if avalues.exists("QaireEmailDate2") then defvalues("QaireEmailDate2")= avalues("QaireEmailDate2") end if if avalues.exists("QaireCompleted") then defvalues("QaireCompleted")= avalues("QaireCompleted") end if if avalues.exists("QaireCompleteDate") then defvalues("QaireCompleteDate")= avalues("QaireCompleteDate") end if if avalues.exists("PtListPulled1") then defvalues("PtListPulled1")= avalues("PtListPulled1") end if if avalues.exists("PtListN-1") then defvalues("PtListN-1")= avalues("PtListN-1") end if if avalues.exists("PtListSent") then defvalues("PtListSent")= avalues("PtListSent") end if if avalues.exists("PtListSentDate-1") then defvalues("PtListSentDate-1")= avalues("PtListSentDate-1") end if if avalues.exists("PtListRemindSent") then defvalues("PtListRemindSent")= avalues("PtListRemindSent") end if if avalues.exists("PtListRemindVia") then defvalues("PtListRemindVia")= avalues("PtListRemindVia") end if if avalues.exists("PtListRemindDate-1") then defvalues("PtListRemindDate-1")= avalues("PtListRemindDate-1") end if if avalues.exists("PtListReturned") then defvalues("PtListReturned")= avalues("PtListReturned") end if if avalues.exists("PtListReturnDate-1") then defvalues("PtListReturnDate-1")= avalues("PtListReturnDate-1") end if if avalues.exists("PtLetterMailed") then defvalues("PtLetterMailed")= avalues("PtLetterMailed") end if if avalues.exists("PtLetterMailDate-1") then defvalues("PtLetterMailDate-1")= avalues("PtLetterMailDate-1") end if if avalues.exists("PtListSentDate-2") then defvalues("PtListSentDate-2")= avalues("PtListSentDate-2") end if if avalues.exists("PtListRemindVia-2") then defvalues("PtListRemindVia-2")= avalues("PtListRemindVia-2") end if if avalues.exists("PtListRemindDate-2") then defvalues("PtListRemindDate-2")= avalues("PtListRemindDate-2") end if if avalues.exists("PtListReturnDate-2") then defvalues("PtListReturnDate-2")= avalues("PtListReturnDate-2") end if if avalues.exists("PtLetterMailDate-2") then defvalues("PtLetterMailDate-2")= avalues("PtLetterMailDate-2") end if if avalues.exists("PtListSentDate-3") then defvalues("PtListSentDate-3")= avalues("PtListSentDate-3") end if if avalues.exists("PtListRemindVia-3") then defvalues("PtListRemindVia-3")= avalues("PtListRemindVia-3") end if if avalues.exists("PtListRemindDate-3") then defvalues("PtListRemindDate-3")= avalues("PtListRemindDate-3") end if if avalues.exists("PtListReturnDate-3") then defvalues("PtListReturnDate-3")= avalues("PtListReturnDate-3") end if if avalues.exists("PtLetterMailDate-3") then defvalues("PtLetterMailDate-3")= avalues("PtLetterMailDate-3") end if if avalues.exists("EdocInviteSent") then defvalues("EdocInviteSent")= avalues("EdocInviteSent") end if if avalues.exists("EdocInviteDate-1") then defvalues("EdocInviteDate-1")= avalues("EdocInviteDate-1") end if if avalues.exists("EdocInviteDate-2") then defvalues("EdocInviteDate-2")= avalues("EdocInviteDate-2") end if if avalues.exists("EdocDirectionsSentDate") then defvalues("EdocDirectionsSentDate")= avalues("EdocDirectionsSentDate") end if if avalues.exists("PenSent") then defvalues("PenSent")= avalues("PenSent") end if if avalues.exists("PenSentDate") then defvalues("PenSentDate")= avalues("PenSentDate") end if if avalues.exists("Withdrawl") then defvalues("Withdrawl")= avalues("Withdrawl") end if if avalues.exists("WithdrawlDate") then defvalues("WithdrawlDate")= avalues("WithdrawlDate") end if if avalues.exists("WithdrawlReason") then defvalues("WithdrawlReason")= avalues("WithdrawlReason") end if if avalues.exists("Notes") then defvalues("Notes")= avalues("Notes") end if if avalues.exists("ClinicID") then defvalues("ClinicID")= avalues("ClinicID") end if if avalues.exists("SPID") then defvalues("SPID")= avalues("SPID") end if end if for each key in defvalues smarty.Add "value_" & GoodFieldName(key),defvalues(key) next '// include files includes="" '// validation stuff bodyonload="" onsubmit="" includes=includes & "<script language=""JavaScript"" src=""include/validate. js""></script> " includes=includes & "<script language=""JavaScript""> " includes=includes & "var TEXT_FIELDS_REQUIRED='" & addslashes("The Following fields are Required") & "'; " includes=includes & "var TEXT_FIELDS_ZIPCODES='" & addslashes("") & "'; " includes=includes & "var TEXT_FIELDS_EMAILS='" & addslashes("The Following fields must be valid Emails") & "'; " includes=includes & "var TEXT_FIELDS_NUMBERS='" & addslashes("The Following fields must be Numbers") & "'; " includes=includes & "var TEXT_FIELDS_CURRENCY='" & addslashes("The Following fields must be currency") & "'; " includes=includes & "var TEXT_FIELDS_PHONE='" & addslashes("The Following fields must be Phone Numbers") & "'; " includes=includes & "var TEXT_FIELDS_PASSWORD1='" & addslashes("The Following fields must be valid Passwords") & "'; " includes=includes & "var TEXT_FIELDS_PASSWORD2='" & addslashes("should be at least 4 characters long") & "'; " includes=includes & "var TEXT_FIELDS_PASSWORD3='" & addslashes("Cannot be 'password'") & "'; " includes=includes & "var TEXT_FIELDS_STATE='" & addslashes("The Following fields must be State Names") & "'; " includes=includes & "var TEXT_FIELDS_SSN='" & addslashes("The Following fields must be Social Security Numbers") & "'; " includes=includes & "var TEXT_FIELDS_DATE='" & addslashes("The Following fields must be valid dates") & "'; " includes=includes & "var TEXT_FIELDS_TIME='" & addslashes("The Following fields must be valid time in 24-hours format") & "'; " includes=includes & "var TEXT_FIELDS_CC='" & addslashes("The Following fields must be valid Credit Card Numbers") & "'; " includes=includes & "var TEXT_FIELDS_SSN='" & addslashes("The Following fields must be Social Security Numbers") & "'; " includes=includes & "</script> " validatetype="" if validatetype<>"" then bodyonload=bodyonload & "define('value_SPID','" & validatetype & "','SPID');" if bodyonload<>"" then onsubmit="return validate();" bodyonload="onload=""" & bodyonload & """" end if if useAJAX then includes=includes & "<script language=""JavaScript"" src=""include/jquery. js""></script>" & vbcrlf includes=includes & "<script language=""JavaScript"" src=""include/ajaxsuggest.js""></script>" & vbcrlf end if includes=includes & "<script language=""JavaScript"" src=""include/jsfunctions.js""></script> " & vbcrlf includes=includes & "<script language=""JavaScript""> " & vbcrlf includes=includes & "var locale_dateformat = " & locale_info("LOCALE_IDATE") & "; " & vbcrlf includes=includes & "var locale_datedelimiter = """ & locale_info ("LOCALE_SDATE") & """; " & vbcrlf includes=includes & "var bLoading=false; " & vbcrlf includes=includes & "var TEXT_PLEASE_SELECT='" & addslashes("Please select") & "'; " & vbcrlf if useAJAX then includes=includes & "var AUTOCOMPLETE_TABLE='Doctors_autocomplete.asp';" & vbcrlf includes=includes & "var SUGGEST_TABLE='Doctors_searchsuggest.asp';" & vbcrlf includes=includes & "var SUGGEST_LOOKUP_TABLE='Doctors_lookupsuggest.asp';" & vbcrlf end if includes=includes & "</script> " & vbcrlf if useAJAX then includes=includes & "<div id=""search_suggest""></div>" & vbcrlf end if '// include datepicker files includes=includes & "<script language=""JavaScript"" src=""include/calendar. js""></script> " smarty.Add "includes",includes smarty.Add "bodyonload",bodyonload if len(onsubmit)>0 then onsubmit="onSubmit=""" & onsubmit & """" smarty.Add "onsubmit",onsubmit smarty.Add "message",message max_filesize_set=0 set readonlyfields = CreateObject("Scripting.Dictionary") '// show readonly fields linkdata="" if useAJAX then linkdata = linkdata & "<script type=""text/javascript"">" & vbCrLf linkdata = linkdata & "$(document).ready(function(){ " & vbCrLf linkdata = linkdata & "function loadSelectContent(txt, selectControl, selectValue) {" & vbCrLf linkdata = linkdata & "$(""#""+selectControl).get(0).options[0]=new Option (TEXT_PLEASE_SELECT,"""");" & vbCrLf linkdata = linkdata & "var str = txt.split(""\n"")" & vbCrLf linkdata = linkdata & "var index = 0;" & vbCrLf linkdata = linkdata & "for(i=0,j=0; i < str.length - 1; i=i+2, j++) {" & vbCrLf linkdata = linkdata & "$(""#""+selectControl).get(0).options[j+1]=new Option (unescape(str[i+1]),unescape(str[i]));" & vbCrLf linkdata = linkdata & "if ( unescape(str[i]) == selectValue ) {index = j+1;} " & vbCrLf linkdata = linkdata & "}" & vbCrLf linkdata = linkdata & "$(""#""+selectControl).get(0).selectedIndex = index; } " & vbCrLf linkdata = linkdata & "});" & vbCrLf linkdata = linkdata & "</script>" & vbCrLf else end if smarty.Add "linkdata",linkdata templatefile = "Doctors_add.htm" DoEvent "BeforeShowAdd smarty,templatefile" smarty_display(templatefile) function report_error if Err.number<>0 then message = "<div class=message><<< " & "Record was NOT added" & " >>><br><br>" & Err.Description & "</div>" readavalues=trueerrorhappened=true err.clear end if end function %> McKirahan wrote: >> Here is the area of html around the save button (plus some more)...where >> would i put the part you gave me into this? Thanks so much again!!! >[quoted text clipped - 15 lines] >> </TD></TR></TBODY></TABLE>{include_if_exists file="include/footer.asp"} { >> $linkdata}<script>SetToFirstControl();</script></BODY></HTML> > >Where's your ASP code? "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798f55780afd8@uwe...> Sorry about that, here is the asp for that "Add doctor" page: Thank you [snip 2400+ lines!]again! > McKirahan wrote: Insert the Function Email() after your ASP code but within <% and %>.> >> Here is the area of html around the save button (plus some more)...where > >> would i put the part you gave me into this? Thanks so much again!!! > > > >Where's your ASP code? After you save the Doctor then call the "Email()" function as I showed you in the Response.Write() statement; for example: If Email("n***@mckirahan.com","Test","Test!")) Then ' success Else ' failure End If How do you save the Doctor? I don't see any database code. What database are you using? Is the code within an "include"? Is this what you mean? Thanks so much by the way.
<TD class=shade style="BACKGROUND-COLOR: #e6e6fa" width=172> <P align=right>SPID</P></TD> <TD width=240>{build_edit_control field="SPID" mode="add" value= $value_SPID} </TD></TR> <TR height=50> <TD style="BACKGROUND-COLOR: #e6e6fa" align=middle width=414 colSpan=2><INPUT class=button id=submit1 type=submit value=Save name=submit1> <INPUT class=button type=reset value=Reset> <input type=hidden name="a" value="added"></TD></TR></FORM><!-- legend --> <TR height=50> <TD style="BACKGROUND-COLOR: #e6e6fa" align=left width=414 colSpan=2> <HR width=400 noShade SIZE=1> <BR><IMG src="images/icon_required.gif"> - Required field </TD></TR></TBODY></TABLE>{include_if_exists file="include/footer.asp"} { $linkdata}<script>SetToFirstControl();</script></BODY></HTML> McKirahan wrote: Show quoteHide quote >> Sorry about that, here is the asp for that "Add doctor" page: Thank you again! > >[snip 2400+ lines!] > >> >> Here is the area of html around the save button (plus some more)...where >> >> would i put the part you gave me into this? Thanks so much again!!! >> > >> >Where's your ASP code? > >Insert the Function Email() after your ASP code but within <% and %>. > >After you save the Doctor then call the "Email()" function as I >showed you in the Response.Write() statement; for example: > >If Email("n***@mckirahan.com","Test","Test!")) Then >' success >Else >' failure >End If > >How do you save the Doctor? >I don't see any database code. >What database are you using? >Is the code within an "include"? "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:799624a4718c6@uwe...> Is this what you mean? Thanks so much by the way. [snip]No. McKirahan, would it be possible to email you directly?
McKirahan wrote: Show quoteHide quote >> Sorry about that, here is the asp for that "Add doctor" page: Thank you again! > >[snip 2400+ lines!] > >> >> Here is the area of html around the save button (plus some more)...where >> >> would i put the part you gave me into this? Thanks so much again!!! >> > >> >Where's your ASP code? > >Insert the Function Email() after your ASP code but within <% and %>. > >After you save the Doctor then call the "Email()" function as I >showed you in the Response.Write() statement; for example: > >If Email("n***@mckirahan.com","Test","Test!")) Then >' success >Else >' failure >End If > >How do you save the Doctor? >I don't see any database code. >What database are you using? >Is the code within an "include"? "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:7997f7b5ea12a@uwe...> McKirahan, would it be possible to email you directly? [snip]Let's keep it in the newsgroup so others may benefit. Thanks for trying to help, but it doesn't seem like anybody knows how to do
this when it comes down to it. I do sincerely appreciate your help though. Tim McKirahan wrote: Show quoteHide quote >> McKirahan, would it be possible to email you directly? > >[snip] > >Let's keep it in the newsgroup so others may benefit. And what do you mean by "snip"?
majahops wrote: Show quoteHide quote >Thanks for trying to help, but it doesn't seem like anybody knows how to do >this when it comes down to it. I do sincerely appreciate your help though. > >Tim > >>> McKirahan, would it be possible to email you directly? >> >>[snip] >> >>Let's keep it in the newsgroup so others may benefit. "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:799a4a59b76cd@uwe...> And what do you mean by "snip"? "[snip]" indicates that lines were removed from a previous postto avoid clutter; that is, to keep the size of the message down as well as to allow the most relevant points to be readable > majahops wrote: The "anybody" you refer to is evidently me and I do know how to> >Thanks for trying to help, but it doesn't seem like anybody knows how to do > >this when it comes down to it. I do sincerely appreciate your help though. sedn email from within ASP using GoDaddy. You haven't answered my questions about how use use ASP to save a new Doctor so the task of helping you is difficult. Good luck. Show quoteHide quote > >>> McKirahan, would it be possible to email you directly? > >> > >>[snip] > >> > >>Let's keep it in the newsgroup so others may benefit. I didn't mean to be rude, im just desperate. Can I attach/send all of my asp
and aspx files relating to this so you can see? Im sure you'll know which one it is within a few seconds. It'd mean a lot. thanks Tim McKirahan wrote: Show quoteHide quote >> And what do you mean by "snip"? > >"[snip]" indicates that lines were removed from a previous post >to avoid clutter; that is, to keep the size of the message down >as well as to allow the most relevant points to be readable > >> >Thanks for trying to help, but it doesn't seem like anybody knows how to do >> >this when it comes down to it. I do sincerely appreciate your help though. > >The "anybody" you refer to is evidently me and I do know how to >sedn email from within ASP using GoDaddy. > >You haven't answered my questions about how use use ASP to >save a new Doctor so the task of helping you is difficult. > >Good luck. > >> >>> McKirahan, would it be possible to email you directly? >> >> >> >>[snip] >> >> >> >>Let's keep it in the newsgroup so others may benefit. "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:799c0c90ad6f3@uwe...> I didn't mean to be rude, im just desperate. Can I attach/send all of my [snip]asp > and aspx files relating to this so you can see? Im sure you'll know which one > it is within a few seconds. > > It'd mean a lot. thanks Is your site using ASP (.asp) or ASP.NET (.aspx) pages? Don't send them! If you are a developer then you should be able to figure out where my function goes and how it works. If you're not a developer what are you doing maintaining code! ASP.NET. Why, is this the wrong place for that?
McKirahan wrote: Show quoteHide quote >> I didn't mean to be rude, im just desperate. Can I attach/send all of my asp >> and aspx files relating to this so you can see? Im sure you'll know which one >> it is within a few seconds. >> >> It'd mean a lot. thanks > >[snip] > >Is your site using ASP (.asp) or ASP.NET (.aspx) pages? > >Don't send them! If you are a developer then you should be >able to figure out where my function goes and how it works. > >If you're not a developer what are you doing maintaining code! Look McKirahan,
First off, no I am not a developer. I am a clinical oncologist (cancer MD) who is part of a small group of physicians that are trying to organize a volunteer physician-based program that will offer free screening to the uninsured and underinsured populations of california for prostate, breast and other reproductive cancers. I volunteered to work on the website (in retrospect, probably a bad idea, but I promised I would and I need to make good on it). A program called ASPRunner Pro was EXTREMELY useful in helping me get the basic database-layout down, but the feature of having automatic email's sent to doctor's when I add them to the database would be so extremely useful for us that I cannot begin to explain. I wish I had more time in the day to learn this language - and I have tried - but I just never am able find out how to execute this one task. When you first replied, you were like a godsend to us because you were going to - in the long run - save us an extraordinary amount of time, just by taking a few minutes to tell me how to do this one thing. However, clearly, my profound ignorance in this area has frustrated you and tested your patience. That is why I am begging of you, if there is anyway you can just tell me what it is you need to see (exactly) - to help us implement this one feature - you would be making a huge difference across the board. Im sorry for wasting so much of your time, I truly am. majahops wrote: >ASP.NET. Why, is this the wrong place for that? > >>> I didn't mean to be rude, im just desperate. Can I attach/send all of my asp >>> and aspx files relating to this so you can see? Im sure you'll know which one >[quoted text clipped - 10 lines] >> >>If you're not a developer what are you doing maintaining code! "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:79a3686c391d5@uwe...> ASP.NET. Why, is this the wrong place for that? [snip]Yes, this is a Classic ASP newsgroup. The code I provided you before was for Classic ASP not ASP.NET; you'll likely need something else. Perhaps you should try this newsgroup: microsoft.public.dotnet.framework.aspnet "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:798bc3f05f9b3@uwe...> When I click "save" after adding a new record (which contains, among other One of the most difficult things to do is help a non-developer tweak ASP> fields, the person's email address), I want an email to automatically be sent > to that person (at the email that is in the field of that record). How can I > do this? > > Thanks so much, it really means so much to me!!! > code that has been auto-generated by some tool such as ASPRunner, Frontpage or Dreamweaver. We like to be able to get a clear picture of what is going on by reviewing the code but auto-generated code is very, very difficult to follow. Unfortunately I think that unless the tool you are using provides a means of injecting your own code into the page any guess we come up with (and it will be a guess) will fail or work for awhile and then when you tweak the page the newly generated code will trash the changes made. Have you got an email account through which to send these emails? There is a line in your posted ASP (further down in the first branch of this thread) that looks like:- DoEvent "AfterAdd()" My _guess_ is that its after this line you want to call a function to send an email. I recommend that you place the email function in a separate asp file. -- Anthony Jones - MVP ASP/ASP.NET Anthony,
Thank you. It turns out I am in fact using ASP, not ASP.NET. So, I call a function, okay, awesome, but how do I set up my mail smtp server (which will be gmail) and other info, and do I need to "call" that? Anthony Jones wrote: Show quoteHide quote >> When I click "save" after adding a new record (which contains, among other >> fields, the person's email address), I want an email to automatically be sent >> to that person (at the email that is in the field of that record). How can I >> do this? >> >> Thanks so much, it really means so much to me!!! > >One of the most difficult things to do is help a non-developer tweak ASP >code that has been auto-generated by some tool such as ASPRunner, Frontpage >or Dreamweaver. > >We like to be able to get a clear picture of what is going on by reviewing >the code but auto-generated code is very, very difficult to follow. > >Unfortunately I think that unless the tool you are using provides a means of >injecting your own code into the page any guess we come up with (and it will >be a guess) will fail or work for awhile and then when you tweak the page >the newly generated code will trash the changes made. > >Have you got an email account through which to send these emails? > >There is a line in your posted ASP (further down in the first branch of this >thread) that looks like:- > >DoEvent "AfterAdd()" > >My _guess_ is that its after this line you want to call a function to send >an email. >I recommend that you place the email function in a separate asp file. > "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:79b3bc160c577@uwe...> Anthony, [snip]> > Thank you. It turns out I am in fact using ASP, not ASP.NET. So, I call a > function, okay, awesome, but how do I set up my mail smtp server (which will > be gmail) and other info, and do I need to "call" that? You don't need to set up an SMTP server if you are using GoDaddy for hosting. Save the script I posted as "Email.asp" and test it as-is. Awesome. How do I link it to the email address that I created in the record
though? Thanks again!!! McKirahan wrote: Show quoteHide quote >> Anthony, >> >> Thank you. It turns out I am in fact using ASP, not ASP.NET. So, I call a >> function, okay, awesome, but how do I set up my mail smtp server (which will >> be gmail) and other info, and do I need to "call" that? > >[snip] > >You don't need to set up an SMTP server if you are using GoDaddy for >hosting. > >Save the script I posted as "Email.asp" and test it as-is. *** I TRIED YOUR SCRIPT AS IS AND IT WORKED, IT SENT AN EMAIL TO ME, WHEN I
CHANGED THE TO: EMAIL FROM YOURS TO MINE!!! *** Now all I need to know is how to make it send an email to the email address I add for a doctor when I add them to the database and click "save". The name of the email field is "email"... as you can see from the following little shot of code in the doctors_add.asp page: insert Email field strValue=false if avalues.exists("Email") then _ strValue = avalues.Item("Email") if not errorhappened and not (vartype(strValue)=11 and strValue=False) then if isnull(strValue) then strValue="" ctype = GetRequestForm("type_Email") rs("Email") = strValue .... So how do I use the value for "email" to send an email to when I click on save, the relevant code for which is shown below - from an html file called Doctors_add.html: <TD style="BACKGROUND-COLOR: #e6e6fa" align=middle width=414 colSpan=2><INPUT class=button id=submit1 type=submit value=Save name=submit1> <INPUT class=button type=reset value=Reset> <input type=hidden name="a" value="added"></TD></TR></FORM> This is the part about the adding of the record in the original ASP: '// after add event DoEvent "AfterAdd()" message="<div class=message><<< " & "Record was added" & " >>></div>" end if else readavalues=true end if ... im guess I put the command for it to "call" email.asp based on a record somewhere here, but have no idea how to? majahops wrote: >Awesome. How do I link it to the email address that I created in the record >though? Thanks again!!! > >>> Anthony, >>> >[quoted text clipped - 8 lines] >> >>Save the script I posted as "Email.asp" and test it as-is. "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:79b5adcd1e5fe@uwe...Show quoteHide quote > *** I TRIED YOUR SCRIPT AS IS AND IT WORKED, IT SENT AN EMAIL TO ME, WHEN colSpan=2><INPUTI > CHANGED THE TO: EMAIL FROM YOURS TO MINE!!! *** > > Now all I need to know is how to make it send an email to the email address I > add for a doctor when I add them to the database and click "save". > > The name of the email field is "email"... as you can see from the following > little shot of code in the doctors_add.asp page: > > insert Email field > strValue=false > if avalues.exists("Email") then _ > strValue = avalues.Item("Email") > if not errorhappened and not (vartype(strValue)=11 and strValue=False) then > if isnull(strValue) then strValue="" > ctype = GetRequestForm("type_Email") > rs("Email") = strValue > > ... So how do I use the value for "email" to send an email to when I click > on save, the relevant code for which is shown below - from an html file > called Doctors_add.html: > > <TD style="BACKGROUND-COLOR: #e6e6fa" align=middle width=414 Show quoteHide quote > class=button id=submit1 type=submit value=Save name=submit1> [snip]> <INPUT class=button type=reset value=Reset> <input type=hidden name="a" > value="added"></TD></TR></FORM> > > This is the part about the adding of the record in the original ASP: > '// after add event > DoEvent "AfterAdd()" > message="<div class=message><<< " & "Record was added" & " >>></div>" > end if > else > readavalues=true > end if > .. im guess I put the command for it to "call" email.asp based on a record > somewhere here, but have no idea how to? > > majahops wrote: > >Awesome. How do I link it to the email address that I created in the record > >though? Thanks again!!! Within the ASP code (which is between <% and %>) what is the name of the variable that stores the retrieved input value from the form? Whatever it is just substitute it for the variable name "address" below. <% If Email(address,"your subject","your message")) Then ' success Else ' failure End If %> If it is "Email" the you should change the name of the function from "Email()" to (perhaps) "Send_Email()" so the names won't conflict. <% If Send_Email(Email,"your subject","your message")) Then ' success Else ' failure End If %> Insert the above after you have successfully added a Doctor record. You may also want to ensure that the email address is correctly formatted before sending the email otherwise it will "bounce". Thanks a bunch McKirahan, I will try it right now. Just got back from a trip
to Sacramento. Sucks. McKirahan wrote: Show quoteHide quote >> *** I TRIED YOUR SCRIPT AS IS AND IT WORKED, IT SENT AN EMAIL TO ME, WHEN I >> CHANGED THE TO: EMAIL FROM YOURS TO MINE!!! *** >[quoted text clipped - 36 lines] >> >Awesome. How do I link it to the email address that I created in the record >> >though? Thanks again!!! > >[snip] > >Within the ASP code (which is between <% and %>) what is the >name of the variable that stores the retrieved input value from the form? >Whatever it is just substitute it for the variable name "address" below. > ><% >If Email(address,"your subject","your message")) Then >' success >Else >' failure >End If >%> > >If it is "Email" the you should change the name of the function from >"Email()" to (perhaps) "Send_Email()" so the names won't conflict. > ><% >If Send_Email(Email,"your subject","your message")) Then >' success >Else >' failure >End If >%> > >Insert the above after you have successfully added a Doctor record. > >You may also want to ensure that the email address is correctly >formatted before sending the email otherwise it will "bounce". So when I put in the code, I get the following message when I try to save the
record: Error number 3749 Error description Fields update failed. For further information, examine the Status property of individual field objects. ... Here is my code (i renamed the function to "mail") function mail If mail(email,"your subject","your message")then ' success Else ' failure End If end function McKirahan wrote: Show quoteHide quote >> *** I TRIED YOUR SCRIPT AS IS AND IT WORKED, IT SENT AN EMAIL TO ME, WHEN I >> CHANGED THE TO: EMAIL FROM YOURS TO MINE!!! *** >[quoted text clipped - 36 lines] >> >Awesome. How do I link it to the email address that I created in the record >> >though? Thanks again!!! > >[snip] > >Within the ASP code (which is between <% and %>) what is the >name of the variable that stores the retrieved input value from the form? >Whatever it is just substitute it for the variable name "address" below. > ><% >If Email(address,"your subject","your message")) Then >' success >Else >' failure >End If >%> > >If it is "Email" the you should change the name of the function from >"Email()" to (perhaps) "Send_Email()" so the names won't conflict. > ><% >If Send_Email(Email,"your subject","your message")) Then >' success >Else >' failure >End If >%> > >Insert the above after you have successfully added a Doctor record. > >You may also want to ensure that the email address is correctly >formatted before sending the email otherwise it will "bounce". ... but i put a space between ) and "then" of course
majahops wrote: Show quoteHide quote >So when I put in the code, I get the following message when I try to save the >record: > >Error number 3749 >Error description Fields update failed. For further information, examine the >Status property of individual field objects. > >... > >Here is my code (i renamed the function to "mail") > >function mail >If mail(email,"your subject","your message")then >' success >Else >' failure >End If >end function > >>> *** I TRIED YOUR SCRIPT AS IS AND IT WORKED, IT SENT AN EMAIL TO ME, WHEN I >>> CHANGED THE TO: EMAIL FROM YOURS TO MINE!!! *** >[quoted text clipped - 31 lines] >>You may also want to ensure that the email address is correctly >>formatted before sending the email otherwise it will "bounce". Any ideas?
majahops wrote: Show quoteHide quote >... but i put a space between ) and "then" of course > >>So when I put in the code, I get the following message when I try to save the >>record: >[quoted text clipped - 20 lines] >>>You may also want to ensure that the email address is correctly >>>formatted before sending the email otherwise it will "bounce". "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:79ced47655496@uwe...Show quoteHide quote > .. but i put a space between ) and "then" of course [snip]> > majahops wrote: > >So when I put in the code, I get the following message when I try to save the > >record: > > > >Error number 3749 > >Error description Fields update failed. For further information, examine the > >Status property of individual field objects. > > > >... > > > >Here is my code (i renamed the function to "mail") > > > >function mail > >If mail(email,"your subject","your message")then > >' success > >Else > >' failure > >End If > >end function You're calling the function from within itself! Why did you put the "If" statement inside of a function? Look another look at what I gave you before.
Show quote
Hide quote
"McKirahan" <N***@McKirahan.com> wrote in message Take another look at what I gave you before.news:ZOednS4At8ggnYvanZ2dnUVZ_sSlnZ2d@comcast.com... > "majahops via WebmasterKB.com" <u37541@uwe> wrote in message > news:79ced47655496@uwe... > > .. but i put a space between ) and "then" of course > > > > majahops wrote: > > >So when I put in the code, I get the following message when I try to save > the > > >record: > > > > > >Error number 3749 > > >Error description Fields update failed. For further information, examine > the > > >Status property of individual field objects. > > > > > >... > > > > > >Here is my code (i renamed the function to "mail") > > > > > >function mail > > >If mail(email,"your subject","your message")then > > >' success > > >Else > > >' failure > > >End If > > >end function > > [snip] > > You're calling the function from within itself! > > Why did you put the "If" statement inside of a function? > > Look another look at what I gave you before. Use the function that worked for you before: Function Email(sAddr,sSubj,sBody) ... End Function Oh no, I meant that was the code for CALLING the function.
McKirahan wrote: Show quoteHide quote >> > .. but i put a space between ) and "then" of course >> > >[quoted text clipped - 26 lines] >> >> Look another look at what I gave you before. > >Take another look at what I gave you before. > >Use the function that worked for you before: > > Function Email(sAddr,sSubj,sBody) > ... > End Function I'm looking at this and I am so lost. Right now I have a file called
Doctors_add.asp, which works well to add a doctors record. The part of this file with the function in it is below: Response.Write("send_email = " & send_email("majah***@gemail.com","Test", "Test!")) Function send_email(sAddr,sSubj,sBody) send_email = False On Error Resume Next '* '* Declare Constants '* Const cCDO = "http://schemas.microsoft.com/cdo/configuration/" Const cHST = "relay-hosting.secureserver.net" Const cFRM = "tb***@mednet.ucla.edu" '* '* Send email '* Dim objCFG Set objCFG = Server.CreateObject("CDO.Configuration") objCFG.Fields.Item(cCDO & "sendusing") = 2 objCFG.Fields.Item(cCDO & "smtpserver") = cHST objCFG.Fields.Item(cCDO & "smtpserverport") = 25 objCFG.Fields.Update Dim objCDO Set objCDO = Server.CreateObject("CDO.Message") objCDO.From = cFRM objCDO.To = sAddr 'objCDO.BCC = "" 'objCDO.CC = "" objCDO.Subject = sSubj objCDO.TextBody = sBody 'objCDO.HTMLBody = sBody 'objCDO.AddAttachment = "" objCDO.Configuration = objCFG objCDO.Send ' If Err = 0 Then ' Response.Write("<br><br><b>E-email has been sent.</b>") ' Else ' Response.Write("<br><b>Sub send_email()</b>") ' Response.Write("<br><b>CDO Failed:</b> " & Err.Description) ' Response.Write("<br><b>CDO 'Addr':</b> " & sAddr) ' Response.Write("<br><b>CDO 'Subj':</b> " & sSubj) ' Response.Write("<br><b>CDO 'Body':</b> " & sBody) ' End If Set objCDO = Nothing Set objCFG = Nothing '* '* Return '* On Error GoTo 0 send_email = True End Function ... but no email is sent when I click save. Any idea? "majahops via WebmasterKB.com" <u37541@uwe> wrote in message news:79d5bea87d8b4@uwe...> I'm looking at this and I am so lost. Right now I have a file called What does the above line return?> Doctors_add.asp, which works well to add a doctors record. The part of this > file with the function in it is below: > > Response.Write("send_email = " & send_email("majah***@gemail.com","Test", > "Test!")) Is it "send_mail = True" or send_mail = False"? Remove the single quotes from theses lines and see what you get. ' If Err = 0 Then ' Response.Write("<br><br><b>E-email has been sent.</b>") ' Else ' Response.Write("<br><b>Sub send_email()</b>") ' Response.Write("<br><b>CDO Failed:</b> " & Err.Description) ' Response.Write("<br><b>CDO 'Addr':</b> " & sAddr) ' Response.Write("<br><b>CDO 'Subj':</b> " & sSubj) ' Response.Write("<br><b>CDO 'Body':</b> " & sBody) ' End If
HTTP 401.1 error when using IP address...
ASP Page, Access Base, PARAMETER not send !!! Page continuously refreshs Newbie: Problem with dsn odbc PLEASE HELP! Getting Error -214746259 Creating a variable name as the value of another variable. Why this ASP code all of the sudden stopped working? Http 500 Internal Error Visual Studio 2005 backwards compatible with classic ASP ? using dot.net with asp classic ? |
|||||||||||||||||||||||