View Single Post
  #1 (permalink)  
Old August 12th, 2003, 11:54 AM
savoym savoym is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 119
Thanks: 0
Thanked 1 Time in 1 Post
Default Syntax question please.

I have this VBScript code in my ASP and I am wanting to type out the word "Yes" if the checkbox is "on" but I am getting syntax errors that I can't seem to correct. Any help would be appreciated. Here is the code I am trying to run:

strmessage = Request.Form("RegData")

Set objUser = Server.CreateObject("PropertyStore.ASPVars")
strmessage = strmessage & _
"***** Online Registration *****" & vbCRLF & _
"Internet Access in Office: & " & If Request.Form("I_Office_Access") = "on" Then Response.Write("Yes") End If & vbCRLF & _
"Practice Name: " & Request.Form("organization") & vbCRLF & _
"Alt Practice Name: " & Request.Form("organization_name") & vbCRLF & _
"Last Name: " & Request.Form("Last_Name") & vbCRLF & _
"First Name: " & Request.Form("First_Name") & vbCRLF & _
"Middle Initial: " & Request.Form("MI") & vbCRLF & _
"Title: " & Request.Form("title") & vbCRLF & _
"Specialty: " & Request.Form("Specialty") & vbCRLF & _
"Address 1: " & Request.Form("Address_1") & vbCRLF & _
"Suite: " & Request.Form("Suite") & vbCRLF & _
"City: " & Request.Form("city") & vbCRLF & _
"State: " & Request.Form("State") & vbCRLF & _
"Zip: " & Request.Form("Zip") & vbCRLF & _
"Phone: " & Request.Form("Phone") & vbCRLF & _
"Fax: " & Request.Form("Fax") & vbCRLF & _
"Challenge Answer: " & Request.Form("Answer") & vbCRLF & _
"Registered At Website: " & strURL & vbCRLF

'***** Distinguish where to send email when registration complete from a particular server. *****
'If InStr(1, LCase(Request.ServerVariables("SERVER_NAME")), "www.dontcare.net") > 0 Then
If len(1, strURL, "www.dontcare") > 0 Then
    objUser.Mail strmessage,"CareGate Registration for Physician","melindasavoy@texashealth.org"
    End If
Reply With Quote