SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast thespursfan's Avatar
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Place cursor in specific place with mailto link?

    Hello. I have a mailto link that populates the body of an email and I would like the cursor to automatically be placed two lines below the body copy.

    For example, this link
    HTML Code:
    <a href=test@test.com?subject=Test Subject&body=TO: Test Person %0D 123 Test st. %0D United States>email us</a>
    will produce something like this in the new email composition:

    TO: Test Person
    123 Test st.
    United States
    How can I get the cursor to be two lines below United States, so people can start typing their email there?

    Can this be accomlished with php or javascript easily?

    I am using outlook, and the majority of my users who will click this link will be using outlook also, if that helps.

    Thanks for any help you can provide.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I doubt that very much, especially if the user has an external email client.
    Besides, you have syntax errors in your markup. The href attribute value must be quoted since it contains non-alphanumeric characters and the &#38; character must be escaped as &#38;amp;.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Enthusiast thespursfan's Avatar
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, thank you for the help. I was just using that as an example. In a real page, I would have made sure it was valid.

  4. #4
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem Solved!

    Don't know if you're still looking for a solution to this, but I'll give you one anyway. Simply insert %0D wherever you want a carriage return in the message body of a mailto link. It will do exactly what you are looking for.

    Lates

    Tbolt


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
  •