Announcement

Collapse
No announcement yet.

Email a Friend

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Email a Friend

    I want to use the Email script as shown in the Advanced Users Guide V7 but with a slight modification. The original script is below:

    <input type=text value="" size=40 onchange="
    var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';
    if (this.value != '') {
    location.href='mailto:' + this.value +'?subject=Take%20a%20look%20at%20NETQUOTEVAR:PRODUCTNAME&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.'
    }
    ">
    <input type=button value="OK">

    I would like to replace the input button and text box with a simple icon, that when clicked brings up the email client in the same way, with the same message and product url. The only thing it won't include is the friend's email address which will have to be filled in manually in the email client.

    My variation is as follows:
    <input type="image" id="email" src="email_icon.gif" alt="Tell a friend about this product" onclick="
    var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';
    {
    location.href='mailto:' +'?subject=Take%20a%20look%20at%20NETQUOTEVAR:PRODUCTNAME&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.'
    }
    ">

    This seems to work, but in the background the website goes to General Script Error page with the error message "Error: Could not locate the product reference." which I can't seem to get around. Oddly, the product reference does appear appended to the url so the error message is misleading. I know Actinic doesn't support script changes but I would be so grateful for some help on this as I'm so close!

    #2
    I can't believe that no one has replied to this. Surely there's someone out there who can help?
    Mark

    Comment


      #3
      Fixed it. Got it working.

      Comment


        #4
        And the fix was?

        Comment


          #5
          ****drum roll****

          Comment


            #6
            Not sure I want to tell what the fix was!! Bit peeved at no one responding! But hey, forgive and forget!

            The script modification is at the end of this post. But this exercise has highlighted a possible flaw in the original script as published in the advanced user guide V7. Let me explain.

            When the the script is used as a CUSTOMVAR set up for each individual product it works a treat. However, when it is set at the section level for all products in that section the NETQUOTEVAR:PRODUCTNAME is not replaced with the product name, nor the NETQUOTEVAR:PRODUCTANCHOR. Very mysterious. Is anyone aware of this. Is there a fix, because setting a CUSTOMVAR property at the product level for all products will take forever and is a little impractical.

            Hoping for a better response this time.

            Fix for Customisation (Replace email_icon.gif with your own image):
            <img src="email_icon.gif" border="0" alt="Tell a friend about this product" title="Click here to tell a friend about this product"
            onclick="var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';{location.href='mailto:' + this.value +'?subject=Take%20a%20look%20at%20the%20NETQUOTEVAR:PRODUCTNAME&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.'}">

            Instead of a text box on the web page for the visitor to fill in with they have to fill it in on the email itself. This is better in a way as they can click on the "TO" word to locate the email address in their address book.

            You can also include an onmousover to change the cursor to a hand when it runs over the image.

            Comment


              #7
              Hoping for a better response this time.
              dont forget this forum is purely voluntary....

              Comment


                #8

                Comment


                  #9
                  I like your templates leehack. Very nice.

                  Comment


                    #10
                    Yet again, problem solved.

                    Comment

                    Working...
                    X