1 Reply Latest reply on Jun 26, 2013 8:27 AM by try67

    How to use an export value (mail address) from a dropdownmenu as mailto address (javascript submit)

    Vincent van Dun

      Hi all,

       

      I'm struggling with a code i can't write. I've got a dropdownmenu called "Leverende vestiging".

      I've got a submit button called "Verzenden". The submit button contains some javascript on Mouse Up.

       

      In the dropdownmenu i use a mail address as export value.

      I want to get my export value of my dropdown menu into my code of javascript for my submit button.

       

      Can somebody help me? I've been searching on google, but i didn't find anything that could help me on the way.

      Awaiting for your help.

       

      Kind Regards,

      Vincent

       

      Mouse up javascript:

      // Set up the recipients,subject, body, etc.
      var sTo = "dropdownmenu exportvalue";
      var sBCC = "";
      var sSubject = "Subject";
      var sBody = "My body text";

      /

      / Set the error messge to display if it doesn't work, \r = carriage return
      var sErrorMsg = "Could not send email. Please make sure your email client is set up correctly.\r\r";
      sErrorMsg += "Otherwise, save this file and manually attach it to an email to: " + sTo";

       

      // Email the entire document
      try {
          mailDoc({
          bUI: true,
          cTo: sTo,
          cBcc: sBCC,
          cSubject: sSubject,
          cMsg: sBody
          });
      } catch(e) {
          app.alert(sErrorMsg, 1);
      }