I try to construct a string for output in the body of an email. My problem
is to get new line/carriage return characters inserted.
On reading a txt file I can split lines successfully with split(/[\r\n]/)
(thanks to Thomas Lahn and Evertjan) or
split(String.fromCharCode(13)+String.fromCharCode( 10)) (which is the
traditional #13#10 found in txt files).
But I fail in the reverse process. Neither
var s = "this \r\nor that"
nor
var s = "this '+String.fromCharCode(13)+String.fromCharCode(10)+ 'or that'
produces a new line during output to a mail body in
location="mailto:td*****@qolor.nl?subject=This or that&body="+s
(Both work fine in alert(s) )
So: how to force a new line in txt output ?
Thanks
Tom