...

View Full Version : How to Carriage Return in Mailto text?



RichardE
11-10-2002, 08:51 AM
How can I get a Carriage Return in Mailto text so that the email I am creating is more readable?

Thanks in advance!

joh6nn
11-10-2002, 12:03 PM
you're going to have to provide some actual details on this one. i have a pretty good idea of what it is that you're talking about, but i'd like know exactly what it is you want, before i give an answer. can you post the code that you're using, so that we can be sure what it is you're talking about?

also, in the future, if you have two questions, that are very closely related, please put them in the same post. thanks.

also, because i don't think that this is going to have anything to do with javascript, i'm moving it to the HTML & CSS forum

RichardE
11-10-2002, 03:31 PM
Nothing complicated - just want to break up a long block of text with carriage return and a blank line - as you would in writing text by pressing carriage return.

joh6nn
11-10-2002, 03:42 PM
yeah, but do you mean in a Textarea, or what? i can only guess at the method you're using to send the mail, so i can only guess at what the answer might be. if we could see the code that you're using, that would be great.

joh6nn
11-10-2002, 04:12 PM
ok, this is what you're doing, then:

document.writeln('<a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text&attachment='+filetosend+'">Email</a><br>');

if that's the case, then, i think you can add line breaks, by using the \n character. i'm not positive of that, though. try it, and see.

document.writeln('<a href="mailto:?subject=Pictures from PhotoAlbum&cc= &body=This is the body text\nSecond line of body\nThird line&attachment='+filetosend+'">Email</a><br>');



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum