ajx and retaining textarea new lines

C

Chris

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
 
E

Erwin Moller

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top