Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML Forms
I have this code...


 
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 10-Apr-10 11:49am
Edited 10-Apr-10 14:52pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

After customername, put the <br/> tag.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Here are the inputs I am using
 
<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?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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." />
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 390
1 Sergey Alexandrovich Kryukov 329
2 BillWoodruff 210
3 Afzaal Ahmad Zeeshan 204
4 CPallini 185
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 10 Apr 2010
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100