HI, I am adding comments to my site. When user enerting the comments, it should be add in the same format how he has entered in the textbox. But, everything coming in the same line. Can anyone help me on this?
I think it's not HTML or JS problem, but you should use NL2BR ( $newstring = nl2br($string); ) function in PHP (or similar in ASP, etc...). Then you will get what you need ..
I don't think so it is problem of JS. The comments must be saved anywhere, and I don't think so it's fully managed by JS. So the best was is replace it in PHp or ASP, I dunno which language do you use. If PHP, read this: php.net/manual/en/function.nl2br.php If it is really problem of JS, use the code from MMJ