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
952 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

760 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

19 Experts available now in Live!

Get 1:1 Help Now