7 Replies Latest reply on Feb 14, 2014 1:41 PM by resdesign

    How do I populate the "To:" line with a variable email address?

    nicholelicking

      I am new to coding and am not quite sure how to ask my question. I have a link within a symbol "Email" that I would like to have open a "mailto" window, but there are several instances of this symbol along the timeline, each one using a different email address. So the [Symbol].Email.click code reads:

       

      window.open('mailto:'+sym.getVariable=("emailWindow"),"_self")

       

      and the line in the Stage.creationComplete code that is supposed to call the variable code reads:

       

      sym.getSymbol("Details_David").$("Email").html("dlowrie@fbcep.com").setVariable("emailWindow", "dlowrie@fbcep.com");

       

      With this code, the browser will open a mailto window, but the "To:" line reads, "undefined."

       

      Or, if in the [Symbol].Email.click code, I have:

       

      window.open('mailto:"emailWindow"',"_self")

       

      without trying to name "emailWindow" as the variable, the "To:" line in the mailto line will read, "emailWindow."

       

      How do I populate the "To:" line with a variable email address?