Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Location
    Chelmsford, UK
    Posts
    10

    Default Email Contact Button

    Hi Guys,

    Sorry if I have missed a similar thread but I cannot find one to match my problem.
    In WD I have created a button marked "Contact me" . In web properties I have selected Link to Anchor on the Link Tab, and in the Placeholder Tab I have selected Replace with HTML code. This code is a Javascript to hide my email address:
    <script language="javascript" type="text/javascript">
    <!--
    var name = "john";
    var domain = "xxxxxx.co.uk";
    document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
    document.write(name + '@' + domain + '<\a>'); // -->
    </script>
    When I publish to web, the button dissapears and shows just my email address, xxxxxx.co.uk. Clicking does bring up my mail client, but why does the button disappear ?
    Help appreciated, I think I'm missing something obvious here ??

    John

    Happy New Year to you all as well !!

  2. #2

    Default Re: Email Contact Button

    Quote Originally Posted by millsey View Post
    This code is a Javascript to hide my email address:
    Remember that Web Designer and Xtreme disguise mailto: links by default

    eg source view of an email link:
    Click image for larger version. 

Name:	hidden-email.jpg 
Views:	188 
Size:	51.2 KB 
ID:	68803

  3. #3
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Email Contact Button

    Quote Originally Posted by millsey View Post
    Clicking does bring up my mail client, but why does the button disappear?
    Because that's the way placeholders work. The object you use as a placeholder in Xtreme is not exported. It's position and size is used for the <div> element that contains your code. So that whatever you place there will be correctly positioned and scaled if possible.

    Happy New Year!
    John.

  4. #4
    Join Date
    May 2009
    Location
    Chelmsford, UK
    Posts
    10

    Default Re: Email Contact Button

    Quote Originally Posted by sledger View Post
    Remember that Web Designer and Xtreme disguise mailto: links by default

    eg source view of an email link:
    Click image for larger version. 

Name:	hidden-email.jpg 
Views:	188 
Size:	51.2 KB 
ID:	68803
    Thanks Sledger, I hadn't realised that. I'll just make a link in text stating Contact Me in that case.

    John

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •