Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
I have this code...
<removed /><br />


This is giving me the data I need, but it is presented like this in the email body...

customernamecustomernumber

whereas I would like it to be

customername
customernumber

I know it is simple, but then, so am I!

How do I put a new line in there?

Thanks in advance.

After much experimentation and googling I found the answer.

For those interested, usd "%0A" rather than < br/ > or & nbsp

Many thanks to Pete for his time spent on this matter.
Posted
Updated 10-Apr-10 13:52pm
v2

After customername, put the <br/> tag.
 
Share this answer
 
No, you can't put your href like this as you've changed the reference. What you need to do is to apply that to the text that you display, and not the href.
 
Share this answer
 
sorry Pete, doesn't work.

Am I right in doing this?

onclick="location.href=this.form.sendEmailTo.options[sendEmailTo.selectedIndex].value + this.form.customername.value<br/> + this.form.customernumber.value"/&gt;

for this seems to not allow the mail to be sent.
 
Share this answer
 
v3
Here are the inputs I am using

XML
<p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
                    <input name="customername" size="60"
                        style="background-color: #FFFFCC; text-align: left;" type="text" value="Name"/>
                    <input name="customernumber" size="60"
                        style="background-color: #FFFFCC; text-align: left; width: 202px; margin-left: 42px;"
                        type="text" value="Tel No." />
                </p>



I have tried several ways of adding the newline but it aint working.

Seriously puzzled now.

Do I add a new line here or is there another way I am missing?
 
Share this answer
 
You could add a br tag here:
<input name="customername" size="60"
    style="background-color: #FFFFCC; text-align: left;" type="text" value="Name"/><br />
<input name="customernumber" size="60"
    style="background-color: #FFFFCC; text-align: left; width: 202px; margin-left: 42px;"
    type="text" value="Tel No." />
 
Share this answer
 
No, that just moves the next input onto the next line on the web page, it doesn't put a newline in the body of the email.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900