0

My question is the same as the question stated in adding <br/> to the text-box when user press enter key in jquery

I am getting br but I want to hide the <br> character when user press enter I dont want to display <br> in the text box.

Community
  • 1
  • 1
nayak
  • 1
  • You might need to do it a bit differently. Maybe replacing \n with
    after the user submits the form? I don't think you'll be able to hide the input without some serious hacking.
    – enriquein Mar 29 '11 at 04:46

1 Answers1

1

By textbox, I assume you're talking about a textarea. Then you should be adding a \n instead of a BR.

JohnP
  • 49,507
  • 13
  • 108
  • 140
  • while the \n might not show up as text in your DB, it should be adding a break in your text. Alternatively you can call `nl2br` and `str_replace()` to switch between `\n` or `
    `
    – JohnP Mar 29 '11 at 05:52