2 Replies Latest reply on Jun 8, 2015 1:09 PM by creditunion123

    embed actual link to webpage in email generated by javascript

    creditunion123 Level 1

      I am trying to generate an email that will send a pdf to someone and also a link to a youtube channel.  The email worked great except for the fact it just listed the youtube address but did not create a link - first go round

      I found stuff that said put <a href= + the URL which I did but now I get an error stating I am missing } in XML expression where it is set to submit as PDF

      Not sure how to fix

       

       

       

      var email = this.getField("FormValues.emailAddress_0").value
      var email2 = this.getField("FormValues.emailAddress_1").value


      var cSubLine = " Terms and Conditions";

      var cBody = "Please find attached important information regarding the terms and conditions of your account . These forms contain information on protecting your privacy, features of Online Banking and the responsibilities of both us and you, the member for protecting your online data.  We have also attached a link to a number of YouTube videos." + "\n\n" + "These videos go over some of the features offered by our Online Banking as well as ways to protect your online data." +"\n\n" + <a href=' +  "https://www.youtube.com/channel/UCQiDrmS2WeGP_HmEeD652EA"+ '> +"\n\n" +staff;

      var cCCAddr = email +";" + email2;
      var name = this.getField("FormValues.accountNames_0").value
      var folio =this.getField("FormValues.folioNumber_0").value

      var oNewDoc = this.extractPages(this.numPages-20, this.numPages-1);
       
      var cEmailURL = "mailto:?cc=" + cCCAddr + "&subject=" + cSubLine + "&body=" + cBody;

       

      myTrustedSpecialSaveFunc(oNewDoc, "/HO-VM-SARUMAN/WorkSpaces/Public Folders/AccountOpening/TermsandConditions/" +"Account Agreement "+name + " " +folio +".pdf");


      oNewDoc.submitForm({
           cURL: cEmailURL,
           cSubmitAs:"PDF",
           cCharSet:"utf-8"});

      oNewDoc.closeDoc(true);