HomeServicesContact Lenses OrderTeamLinksContact

Contact Lens Order

<% function FieldOK(FieldName) if Request.Form(FieldName) = "" and Request.Form("send") then FieldOK = false else FieldOK = true end if end function function FieldWithDefaultOK(DefaultValue, FieldName) if Request.Form(FieldName) = DefaultValue and Request.Form("send") then FieldWithDefaultOK = false else FieldWithDefaultOK = true end if end function %>
<%if Request.Form("send") <> "" then if Request.Form("Prenom") = "" or FieldWithDefaultOk("Jour", "NaissanceJour") = false or FieldWithDefaultOk("Mois", "NaissanceMois") = false or FieldWithDefaultOk("Annee", "NaissanceAnnee") = false or Request.Form("CodeRegional") = "" or Request.Form("Tel1") = "" or Request.Form("Tel2") = "" or Request.Form("Courriel") = "" then Response.Write("Please complete all ") end if end if if Request.Form("Prenom") <> "" and FieldWithDefaultOk("Jour", "NaissanceJour") and FieldWithDefaultOk("Mois", "NaissanceMois") and FieldWithDefaultOk("Annee", "NaissanceAnnee") and Request.Form("CodeRegional") <> "" and Request.Form("Tel1") <> "" and Request.Form("Tel2") <> "" and (Request.Form("typeJetableDroit") <> "" or Request.Form("typeJetableGauche") <> "" ) and Request.Form("Courriel") <> "" then Set Mailer = Server.CreateObject("CDONTS.NewMail") ' Variable ajoutée par Max Dim bodyMail ' Construire le contenu du mail bodyMail = bodyMail & "Client Name: " & Request.Form("Titre") & " " & Request.Form("Prenom") & vbCrLf & vbCrLf bodyMail = bodyMail & "Date of birth : " & Request.Form("NaissanceJour") & " " & Request.Form("NaissanceMois") & " " & Request.Form("NaissanceAnnee") & vbCrLf & vbCrLf bodyMail = bodyMail & "Telephone: " & Request.Form("CodeRegional") & "-" & Request.Form("Tel1") & "-" & Request.Form("Tel2") & vbCrLf & vbCrLf bodyMail = bodyMail & "Email: " & Request.Form("Courriel") & vbCrLf & vbCrLf bodyMail = bodyMail & "Product Name: " & Request.Form("produit") & vbCrLf & vbCrLf bodyMail = bodyMail & "Eye: " & Request.Form("typeJetableDroit") & ", " & Request.Form("typeJetableGauche") & vbCrLf & vbCrLf bodyMail = bodyMail & "Re-order for: " & Request.Form("Quantite") & vbCrLf & vbCrLf bodyMail = bodyMail & "Number of boxes : " & Request.Form("boites") & vbCrLf & vbCrLf bodyMail = bodyMail & "Remarks: " & Request.Form("remarques") & vbCrLf Mailer.Body = bodyMail ' Envoyer le mail Mailer.From = Request.Form("Courriel") Mailer.To = "info@kboc.ca" Mailer.Cc = Request.Form("Courriel") Mailer.Subject = "Contact Lenses Order from Web" Mailer.Send %>

Your order has been sent.

We will contact you as soon as your contact lenses are ready for pick-up.

Thank You!

<% else %> mandatory fields *

  Title: 
* Full name:  "> <% if FieldOk("Prenom") = false then Response.Write("Enter your name") end if %>
Date of birth:  <% if FieldWithDefaultOk("Day", "NaissanceJour") = false or FieldWithDefaultOk("Month", "NaissanceMois") = false or FieldWithDefaultOk("Year", "NaissanceAnnee") = false then Response.Write("Date mandatory") end if %>
* Day time telephone:  "> "> "> <% if FieldOk("CodeRegional") = false or FieldOk("Tel1") = false or FieldOk("Tel2") = false then Response.Write("Telephone no. mandatory") end if %>
* E-mail:  "> <% if FieldOk("Courriel") = false then Response.Write("E-mail mandatory") end if %>
(for confirmation email only, will not be given to a third party)
*  Type of lenses required:  Name of product:   ">
<% if ((FieldOk("typeJetableDroit") = false and FieldOk("typeJetableGAuche") = false) or (FieldOk("Quantite") = false) or FieldOk("produit") = false or FieldOk("boites") = false) and (FieldOk("typeRegulierOeilDroit") = false and FieldOk("typeRegulierOeilGauche") = false) then Response.Write("Mandatory Fields") end if %>
Right Eye >         Left Eye >

Quantity:

1 year >       6 months >      3 months >

OR

Number of boxes: ">

Comments:

    

<% end if %>
Optometric Services Inc. Essilor