Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > ajx and retaining textarea new lines

Reply
Thread Tools

ajx and retaining textarea new lines

 
 
Chris
Guest
Posts: n/a
 
      11-29-2008
I am using ajax to send the value of a form's textarea with something
like onsubmit=doPreview(this.form.text.value).

This doesn't give the required result as as new lines from the
textarea are lost and I need to retain them. How do I retain the new
lines I am sending to the php script?

Many thanks,

Chris
 
Reply With Quote
 
 
 
 
Erwin Moller
Guest
Posts: n/a
 
      12-01-2008
Chris schreef:
> I am using ajax to send the value of a form's textarea with something
> like onsubmit=doPreview(this.form.text.value).
>
> This doesn't give the required result as as new lines from the
> textarea are lost and I need to retain them.


I don't think so.
Newlines are send to the webserver just fine.

How do I retain the new
> lines I am sending to the php script?


Are you maybe using virtual?
<textarea wrap="virtual">

That will make the browser SHOW word wrap in the textarea box, but will
not send them as content.

Regards,
Erwin Moller

PS: The obvious: You are NOT thinking that newlines show up in HTML I
presume. You need <br> for that.


>
> Many thanks,
>
> Chris



--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split Textarea (by lines), trim and save to Database David ASP General 2 09-18-2007 04:16 PM
How to add </textarea> within <textarea> tags? frank.moens@gmail.com Javascript 1 07-04-2007 04:00 PM
Textarea Inside of a textarea wperry1@gmail.com ASP General 6 02-05-2006 08:00 AM
Removing carriage returns from <textarea></textarea> input Augustus ASP General 1 09-10-2003 04:55 AM
Re: how to read 10 lines from a 200 lines file and write to a new file?? Joe Wright C Programming 0 07-27-2003 08:50 PM



Advertisments