Solved

Some code to get a carriage return in a "mailto: ... &body=some text long enough to require a CR

Posted on 2006-11-27
5
953 Views
Last Modified: 2010-04-06
Hi folks,

I was wondering if there is a way to introduce a carriage return into a simple mailto: link on a page, so that the body of the email message that is generated does not come out like a run-on sentence.

I'm hoping that in the same way %20 does the space character, another code might do the CR.

Thanks for your help.


0
Comment
Question by:charlietou
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:TeRReF
ID: 18019427
Use "\r\n"
0
 
LVL 3

Author Comment

by:charlietou
ID: 18019661
Hi,

Unfortunately, that didn't work.  

I'll include the pertinent text here:

<a href="mailto:info@mydomain.com?subject=Request%20for%20information &body=I would like more information. Please contact me. <CR GOES HERE> [You may optionally provide your phone number here, and the best time of day to reach you. Thank you for your interest.]"

Using \r\n in that spot caused "\r\n" to show up in the text.

Am I missing something?

Charlie T.
0
 
LVL 29

Accepted Solution

by:
TeRReF earned 200 total points
ID: 18019765
Try this:
<a href="mailto:info@mydomain.com?subject=Request%20for%20information &body=I would like more information. Please contact me. %0D%0A [You may optionally provide your phone number here, and the best time of day to reach you. Thank you for your interest.]"
0
 
LVL 3

Author Comment

by:charlietou
ID: 18020151
Thanks, TeRRef,
That did the job!

0
 
LVL 29

Expert Comment

by:TeRReF
ID: 18020262
You're welcome :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now