Line break in the mailto onclick
Posted
by malaki1974
on Stack Overflow
See other posts from Stack Overflow
or by malaki1974
Published on 2010-03-24T18:02:32Z
Indexed on
2010/03/24
18:13 UTC
Read the original article
Hit count: 292
The code below works great except the email has all the text on one line like this: Height: 60 | Diagonal: 123 | Width: 107 | Total SF: 13.92 | Cost Per SF: 450 | Total Cost: $6,264.00
I would like to break after each so it looks like this:
Height: 60
Diagonal: 123
Width: 107
Total SF: 13.92
Cost Per SF: 450
Total Cost: $6,264.00
I tried \n \r \n\r etc but none of them work. Any ideas?
<a class="emailText" href="mailto:?subject=Screen Dimensions" onclick="this.href='mailto:?subject=Screen Dimensions&body='+'Height: '+document.forms.myform.high.value+' | '+'Diagonal: '+document.forms.myform.diagonal.value+' | '+'Width: '+document.forms.myform.wide.value+' | '+'Total SF: '+document.forms.myform.sf.value+' | '+'Cost Per SF: '+document.forms.myform.csf.value+' | '+'Total Cost: '+document.forms.myform.tc.value">Email</a>
© Stack Overflow or respective owner