Announcement

Collapse
No announcement yet.

Email hyperlink within fragment page

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

    Email hyperlink within fragment page

    I guys, i have found the details for adding a "contact us" email link within the Advanced Users Guide, however this code appears only to work when inserted directly into html.
    Is there anyway to place a Contact link within a fragment, that still works in the same way, ie is still invisible on the page, but doesnt require me to alter the html directly?

    Pete @ PSL
    www.discoSuperstore.co.uk
    Portsmouth Sound & Light. The South's No.1 DJ Store

    #2
    You could use a text only fragment and then place your contact link within the fragment text as follows:
    !!< html code goes here >!!

    Comment


      #3
      Thanks for the quick response... But...

      Do we have to use a text only fragment? I tried the exclamation points but they dont appear to make any difference, unless of course the code i am using for the email side of things is wrong?

      I tried

      <a href="mailto:info@roycharles.biz">Click here to email Roy</a>

      But like the code suggested within the advance userguide of

      <script type=text/javascript>
      var _u = "info";
      var _d = "roycharles.biz";
      var _l = _u + "@" + _d;
      var _m = "Click here to email Roy";
      document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
      </script>

      But am not sure if that code would work within the fragment page

      Basically i am in the process of updating our customer homepage section, see here http://www.discosuperstore.co.uk/aca...Customers.html
      and currently have the url link working ok, and thought it would be nice have the email text clickable as well.

      Any Ideas?

      Pete @ PSL
      www.discoSuperstore.co.uk
      Portsmouth Sound & Light. The South's No.1 DJ Store

      Comment


        #4
        Have you tried the link tab on the fragment? Alternatively provide the full code you are including so we can see where you are going wrong. I am presuming you have followed Duncan's instructions properly and actually put the code in the markers that he told you to use?

        Comment


          #5
          Thats perfect, if i place mailto: within the url section of the link tab i can get the emails to work, then place the html code for the url hyperlink directly to into the fragment.
          Brilliant, thanks

          Pete @ PSL
          www.discoSuperstore.co.uk
          Portsmouth Sound & Light. The South's No.1 DJ Store

          Comment


            #6
            My pleasure Pete, just be aware of having email addresses stored on pages and easily grabbable (is that a word) by the SPAM bots.

            Comment


              #7
              Thats what i was originally thinking, is there anyway to call the javascript code from a couple of posts up within a fragment, without altering html code directly?

              Pete @ PSL
              www.discoSuperstore.co.uk
              Portsmouth Sound & Light. The South's No.1 DJ Store

              Comment


                #8
                If you put:

                !!<
                <script type=text/javascript>
                var _u = "info";
                var _d = "roycharles.biz";
                var _l = _u + "@" + _d;
                var _m = "Click here to email Roy";
                document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
                </script>

                >!!

                NOTE: the red bits tell actinic to process the part in between them (the green part) as html. Just paste the above into a fragment description field and you should see it, this is what Duncan was telling you in his post, i think you missed what he was saying.

                Comment


                  #9
                  Is there meant to be a space or new line between the !!< >!! and the code? as when i attempted that syntax earlier it just displayed the code, yet yours is working ok?

                  Pete @ PSL
                  www.discoSuperstore.co.uk
                  Portsmouth Sound & Light. The South's No.1 DJ Store

                  Comment


                    #10
                    No not at all, you can even do:

                    !!<<script type=text/javascript>
                    var _u = "info";
                    var _d = "roycharles.biz";
                    var _l = _u + "@" + _d;
                    var _m = "Click here to email Roy";
                    document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
                    </script>>!!

                    I just separated it so i could illustrate what you need to do and how you need to do it. You must have made a slight mistake to be honest.

                    Comment


                      #11
                      Oh well, not sure what i was doing wrong earlier, guess at the end of the day the code works now, and thats all that matters.

                      Many thanks

                      Pete @ PSL
                      www.discoSuperstore.co.uk
                      Portsmouth Sound & Light. The South's No.1 DJ Store

                      Comment

                      Working...
                      X