SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Mailto

  1. #1
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mailto

    Hi,
    How do I use the variable Emailaddress in the output so that it's a mailto link ??
    Thanks !


    Code:
    Dim Email(1),WordArray,EmailAddress,NameStr,VoorAchterNaam
    
    NameStr = Trim(RS("name"))
    
    Email(0) = Replace(Trim(VoorAchterNaam)," ",".")
    Email(1) = "@somedomain.nl"
    
    EmailAddress = Join(Email,"")
    'TrimmedEmail = Trim(EmailAddress)
    %>
    HTML Code:
    <tr><td valign="top">E-mail:</td><td valign="top"><strong><%=Trim(EmailAddress)%></strong></td></tr>
    MySQL version is 4.1.10

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <a href="mailto:<%=Trim(EmailAddress)%"><%=EmailAddress%></a>
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Tommy,
    Thanks for your reply, but I get this:

    Invalid character
    /scripts/persredir.asp, line 120

    Response.Write(Trim(EmailAddress)%"><%=EmailAddress)
    ---------------------------------^

    Tried to remove this % character but doesn't do the trick.
    Any other suggestions ?

    edit: Got it
    <a href="mailto%=Trim(EmailAddress)%>"><%=EmailAddress%></a>
    Thanks for puting me on track !!
    MySQL version is 4.1.10

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A typo, sorry.

    Code:
    <a href="mailto:<%=Trim(EmailAddress)%>"><%=EmailAddress%></a>
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    netherlands
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    A typo, sorry.

    Code:
    <a href="mailto:<%=Trim(EmailAddress)%>"><%=EmailAddress%></a>
    No prob !!
    MySQL version is 4.1.10


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
  •