I have a textarea and I have some AJAX code so that as you type in the text bos everytime you hit space it sends what is in the text box off to the PHP script on the server where all the bb codes are added and then you are given a visual representation of how your message will look. The problem is that when pressing enter in my textarea the script returns it without a line break. I am using nl2br in the php script but it does nothing. I was wondering if there was any Javascript function to convert carrige returns to line breaks.
Any help is much appreciated.
Thanks
2006-08-01
22:06:04
·
2 answers
·
asked by
mrman2289
2
in
Computers & Internet
➔ Programming & Design