Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Thanked 0 Times in 0 Posts

    Question need help with understanding code

    The paragraph below is off the web page and below that is the script for that area.

    [COLOR="Blue"]Is your company a party to any judgements,
    claims, or lawsuits pending or outstanding,
    including Directors or employees, or subject
    to prosecution by a regulatory body? No
    Is your company involved in any bankruptcy
    or reorganisation proceedings? No
    Public Liability Yes
    Verified Yes
    Date Verified 2/8/2006
    Policy Number xxxxxxxx
    Liability Limit 999999999
    Renewal Date 30/6/2007
    Insurance Company ????????????
    Post Code 4001
    Country Australia
    Phone Number 99 9999 9999
    Fax Number 99 9999 9999 [/COLOR

    <script type="text/javascript" src="ew.js"></script>
    <script type="text/javascript">
    EW_dateSep = "/"; // set date separator
    EW_UploadAllowedFileExt = "gif,jpg,jpeg,bmp,png,doc,xls,pdf,zip"; // allowd upload file extension
    <script type="text/javascript">
    function EW_checkMyForm(EW_this) {
    if (EW_this.x_Date_Verified && !EW_checkeurodate(EW_this.x_Date_Verified.value)) {
    if (!EW_onError(EW_this, EW_this.x_Date_Verified, "TEXT", "Incorrect date, format = dd/mm/yyyy - Date Verified"))
    return false;
    if (EW_this.x_Liability_Limit && !EW_checkinteger(EW_this.x_Liability_Limit.value)) {
    if (!EW_onError(EW_this, EW_this.x_Liability_Limit, "TEXT", "Incorrect integer - Liability Limit"))
    return false;
    if (EW_this.x_Renewal_Date && !EW_checkeurodate(EW_this.x_Renewal_Date.value)) {
    if (!EW_onError(EW_this, EW_this.x_Renewal_Date, "TEXT", "Incorrect date, format = dd/mm/yyyy - Renewal Date"))
    return false;
    if (EW_this.x_Date_Verified1 && !EW_checkeurodate(EW_this.x_Date_Verified1.value)) {
    if (!EW_onError(EW_this, EW_this.x_Date_Verified1, "TEXT", "Incorrect date, format = dd/mm/yyyy - Date Verified"))
    return false;
    if (EW_this.x_Liability_Limit1 && !EW_checkinteger(EW_this.x_Liability_Limit1.value)) {
    if (!EW_onError(EW_this, EW_this.x_Liability_Limit1, "TEXT", "Incorrect integer - Liability Limit"))
    return false;
    if (EW_this.x_Renewal_Date1 && !EW_checkeurodate(EW_this.x_Renewal_Date1.value)) {
    if (!EW_onError(EW_this, EW_this.x_Renewal_Date1, "TEXT", "Incorrect date, format = dd/mm/yyyy - Renewal Date"))
    return false;

    At the moment, when insurance information is added, an email is sent to one of the administrators to advise them

    ' Send Email
    Dim sSenderEmail, sReceiverEmail
    sSenderEmail = "helpdesk@cmpl.com.au" ' sender email
    sReceiverEmail = "wwilkins@cmpl.com.au" ' receiver email
    If sSenderEmail <> "" And sReceiverEmail <> "" Then
    Call LoadEmail("notify.txt")
    sEmailFrom = Replace(sEmailFrom, "<!--$From-->", sSenderEmail) ' Replace Sender
    sEmailTo = Replace(sEmailTo, "<!--$To-->", sReceiverEmail) ' Replace Receiver
    sEmailSubject = Replace(sEmailSubject, "<!--$Subject-->", table & " record inserted") ' Replace Subject
    sEmailContent = Replace(sEmailContent, "<!--table-->", table)
    sEmailContent = Replace(sEmailContent, "<!--key-->", sKey)
    sEmailContent = Replace(sEmailContent, "<!--action-->", "Inserted")
    Call Send_Email(sEmailFrom, sEmailTo, sEmailCc, sEmailBcc, sEmailSubject, sEmailContent, sEmailFormat)
    End If
    End Sub

    What I would like to do is somehow have an email sent to the administrator when the due date for the insurance expiry date is within 2 weeks, also need to identify the areas that I can change without messing with the code: ie This email is from “company” for their company insurance update

    If anyone can help, I would be extremely happy – I keep putting it on the back burner

  2. #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Between DC and Baltimore In a Cave
    Thanked 94 Times in 88 Posts
    If you want to delay sending an email, than you need to build some sort of process on the server that does it. Has nothing to do with JavaScript or JS frameworks.

    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts