Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   ajx and retaining textarea new lines (http://www.velocityreviews.com/forums/t937769-ajx-and-retaining-textarea-new-lines.html)

Chris 11-29-2008 06:46 PM

ajx and retaining textarea new lines
 
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

Erwin Moller 12-01-2008 12:29 PM

Re: ajx and retaining textarea new lines
 
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


All times are GMT. The time now is 11:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.