Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Capturing "Enter Key" Value in Javascript

 
Gurpreet Sidhu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i press Enetr key in my Text Area Field . Its passing the enter key value to database. I want to capture that value and change it to " " space. How can i capture my "Enter Key " value in Javascript?/
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be doing it on the server and not the client. You need a basic regular expression replaceAll("\\n"," ");

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic