Announcement

Collapse
No announcement yet.

Email A Friend Image Link

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

    Email A Friend Image Link

    Does anyone know how to modify the 'email a friend' link to work as follows:

    You click on an image that says 'Email a Friend' (if the image can have a rollover effect so much the better)... clicking the image opens up the email program (Outlook etc) and auto fills the subject line and inserts a link to that page in the body of the message. The sender would then type in the recipient's email address or select from their address book.

    All help much appreciated
    Actinic Web Design | Actinic Templates

    #2
    Have you looked in the AUG as i thought it was documented there?

    Comment


      #3
      There is an email a frined link in the AUG but it works slightly differently. With that version you fill in the email address on the page and press 'send'.

      I was wondering if someone with a bit more coding experience than I have could modify that to work as an image link so you enter the email address in the email program, not on the page.
      Actinic Web Design | Actinic Templates

      Comment


        #4
        You simply need to use the mailto command linked to the image and page variable to add the page the image is located on.

        Comment


          #5
          Hi Malcolm, would you mind showing me how this would work? I don't mind admitting that I'm not very experienced at this kind of thing. I know what you mean in principle but I can't quite get my head around knowing exactly what I need to do.

          Thanks, Rob
          Actinic Web Design | Actinic Templates

          Comment


            #6
            Try code similar to the following (I have adapted the AUG instructions for a mailto: link that is protected from mail harvesters)

            Code:
            <script type=text/javascript>
            var _u = "sales";
            var _d = "domain.co.uk?subject=here is a subject";
            var _l = _u + "@" + _d;
            var _m = "<img src='image.jpg' />";
            document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
            </script>
            Absolutely no idea on the rollover though. I'm not sure how to embed a javascript expression within a JavaScript expression.

            Comment


              #7
              Thanks Chris, that's very good of you. I will give it a go and report back.
              Actinic Web Design | Actinic Templates

              Comment


                #8
                try a css rollover

                .tell_a_friend a {
                background_image: url(taf_button.gif);
                }

                .tell_a_friend a:hover {
                background_image: url(taf_button_hover.gif);
                }

                Comment


                  #9
                  right i tried this

                  it is useful if the customer wants to contact us

                  but i think what hes after is a mix of the two

                  so the AUG version without the box to enter your mates email address
                  but to launch the email client with product info populated and you can put in there email address

                  im trying to code it now but its beena while since i did any major coding

                  ill report back soon

                  Gareth
                  Remembering the road to Actinic enlightenment is a long and sometimes painful one.
                  Current project:
                  cheapadulttoys4u.co.uk
                  cheaplingerie4u.co.uk
                  Something for the Missus,Something for the Weekend

                  Comment


                    #10
                    I don't see the problem. The css rollover is just for the "mouseover feedback", it does not concern the link itself (ie the href). The href can be a javascript instruction to prepopulate the mailto fields, pretty much like the one proposed in the aug.

                    Lazyeye

                    Comment


                      #11
                      hi i havent said there is a problem
                      if im reading it right

                      if you look here i think this is similar to what he wants and i would love it TBH

                      http://svp.co.uk/products-solo.php?pid=289

                      click on the Tell a friend about this product. link

                      or

                      just a link that fires up outlook with most of the info
                      Remembering the road to Actinic enlightenment is a long and sometimes painful one.
                      Current project:
                      cheapadulttoys4u.co.uk
                      cheaplingerie4u.co.uk
                      Something for the Missus,Something for the Weekend

                      Comment


                        #12
                        ok, I misread.

                        Comment


                          #13
                          right i can get it to populate the subject line
                          or populate the body

                          but i cant seem to combine the two

                          text in subject line
                          <script type=text/javascript>
                          var _d = "<actinic:variable name="ProductName" />";
                          var _e = "subject=I thought you might like"+_d;
                          var _m = "Email a Friend";
                          document.write("<a href='mailto:?"+_e+"'>"+_m+"</a>");
                          </script>
                          Remembering the road to Actinic enlightenment is a long and sometimes painful one.
                          Current project:
                          cheapadulttoys4u.co.uk
                          cheaplingerie4u.co.uk
                          Something for the Missus,Something for the Weekend

                          Comment


                            #14
                            here is my include a link sode so far

                            <script type=text/javascript>
                            var _f = "<actinic:variable name="ProdRef" />";
                            var _u = "http://www.someurl.co.uk"+_f;

                            var _n = _u +" prices correct at time of upload" ;
                            var _m = "Email a Friend";
                            document.write("<a href='mailto:?body="+_n+"'>"+_m+"</a>");
                            </script>

                            but i cant seem to get var_f to link with the url so they can click the link in the email

                            i also cant seem to merge the above code to fill in teh email subject line
                            no matter how i try

                            can anyone give me some clues?
                            im not asking for it to be done but give me a clue where im going wrong

                            its a challenge now and i wont be beaten


                            Gareth
                            Remembering the road to Actinic enlightenment is a long and sometimes painful one.
                            Current project:
                            cheapadulttoys4u.co.uk
                            cheaplingerie4u.co.uk
                            Something for the Missus,Something for the Weekend

                            Comment


                              #15
                              First use the http://www.cmg02.com/cg2/mailto.htm to generate the sort of code you should be.

                              Then amend your JavaScript to obey the same rules.

                              Also try changing

                              var _f = "<actinic:variable name="ProdRef" />";

                              to be

                              Code:
                              var _f = "#<actinic:variable name="EncodedProductAnchor" encoding="perl" selectable="false" />";
                              Finally copy your Preview URL into Firefox and use it's Tools / Error Console to see bugs.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X