2 Replies Latest reply on Jun 9, 2008 11:10 AM by lisaBoston

    Hyperlink Send to Friend with Parameters

    lisaBoston
      I've created a hyperlink SEND TO FRIEND from a button. The link works fine with no parameters attached (see code below). Now we need to add parameters because we're tracking clicks with Google Anaytics.

      Here's the code without the params. It works fine from any email client:
      on (release)
      {
      getURL ("mailto:?Subject=UMass Boston video &body=Please follow the link to a great video from UMass Boston. Check it out! [ http://www.umb.edu/ua/flash/index.html
      }

      Now when i add the parameters (following the ?) the hyperlink breaks
      on (release)
      on (release)
      {
      getURL ("mailto:?Subject=UMass Boston video &body=Please follow the link to a great video from UMass Boston. Check it out! [ http://www.umb.edu/ua/flash/index.html?flash_changingworld_sendfriend
      }

      I've tried following this with a slash a period... no go.
      End result: when the email is forwarded, the URL is visible but the hyperlink is broken. I'm sure I'm just a syntax away from solving this.
      Thanks for your help. Feel free to also reply to <mailto:lisa.berelson@umb.edu>lisa.berelson@umb.edu</a>
        • 1. Hyperlink Send to Friend with Parameters
          BeniRose
          Hey Lisa. you might want to try using a LoadVars object, since these are more geared towards this kind of thing. All you do is create a loadvars object (e.g. send_lv) and assign values to the object (e.g. send_lv.subject and send_lv.body) and then call send_lv.send(). I believe this works similarly to getURL in that it will open it in the current or new window (depending on what you pass as the target). This will send the values via POST, but you can also set it to send via GET.

          Also, if you're interested in doing an asynchronous transaction (i.e. have it load in the background without opening a new browser window) then check out the sendAndLoad function of LoadVars. You can view all of this and get more information on the Adobe Livedocs.
          • 2. Re: Hyperlink Send to Friend with Parameters
            lisaBoston Level 1
            Thanks Beni. I will review your suggestion which was a little more intricate than i needed. Turns out that by removing the square brackets in my code "[" and "]" which was only a sytlistic element, the hyperlinks still work fine even with the ?params. So it was a non issue.

            Thanks for replying and again, i will review your comments but with my knowledge base, i'd probably need more info to implement this solution.