jmestep
asked on
Line feed in text email using content of asp text box
I'm trying to send the content from an asp:TextBox multi line to a text email via the mailto: function. (Client needs to edit the email before sending- that's why I'm using mailto:)
The text shows up OK in the Textbox on the web form when I use "\r\n". There is a javascript function that pulls the content from that box and adds it to an email and when the email pops up, the linefeeds and even the spaces are removed. How can I keep that from happening. Client doesn't want an html email. Here is the javacript function (code I found somewhere)
function checkForm() {
var emailContentText = document.getElementById("< %=VendorCo ntentText. ClientID %>").value;
var c1 = "mailto:orders@xxx.com?&su bject='New Orders'&bo dy=Note: " + emailContentText + "%0D%0A";
(window.location ? window.location.replace(c1 ) : document.write(c1))
}
If I copy the text from the text box into Notepad++, it shows the spaces and linefeeds.
Thanks
The text shows up OK in the Textbox on the web form when I use "\r\n". There is a javascript function that pulls the content from that box and adds it to an email and when the email pops up, the linefeeds and even the spaces are removed. How can I keep that from happening. Client doesn't want an html email. Here is the javacript function (code I found somewhere)
function checkForm() {
var emailContentText = document.getElementById("<
var c1 = "mailto:orders@xxx.com?&su
(window.location ? window.location.replace(c1
}
If I copy the text from the text box into Notepad++, it shows the spaces and linefeeds.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks