Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
nl2br with javascript forms

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help
View previous topic :: View next topic  
Author Message
Stephen
New one
New one


Joined: 12 Oct 2007
Posts: 1

PostPosted: Fri Oct 12, 2007 10:11 pm    Post subject: nl2br with javascript forms Reply with quote

Hi,

I am in the process of switching a lot of my web pages to using ajax.

When I'm collecting data from a textarea I usually parse it through the php nl2br function before displaying it.

The problem is when I'm using javascript onsubmit to submit the data it loses all the line breaks.

Can anyone tell me how I can keep the line breaks?
Back to top
View user's profile Send private message
rReLmy
New one
New one


Joined: 17 Oct 2007
Posts: 3
Location: basel

PostPosted: Sat Oct 20, 2007 1:04 pm    Post subject: Reply with quote

You can use the html tag
Code:
<pre>comment</pre>
.
This tag let breaks in the Source display like a <br />. Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert