I was looking for a way to do this, got a few scripts, but none of them is working for me.
When I hit enter in my textboxes, it shouldn't do anything.
I have tried a few JavaScript and jQuery scripts, but nothing is working for me.
$(document).ready(function() {
$('#comment').keypress(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
}
});
$('#comment').keyup(function() {
var txt = $('#comment').val();
$('#comment').val(txt.replace(/[\n\r]+/g, " "));
});
});