hi in my webpage i am saving textarea contents on pressing enter button . it is saving but what happens is mouse-cursor moves to next line . it always saves with a newline character . i just want to avoid the mouse-cursor moving to next line and just save it . for saving it i use event.keycode kind of stuff for the textarea and then save it
$('.text_desc_cls').keyup(function(event){save_text_val(event,this.id);});
function save_text_val(event,this_id){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
req_id = '#'+this_id;
textarea_val = $(req_id).val();
$.post("./funcs.php?func=save_int_text_val",{textarea_val:textarea_val},function(data){
alert('done');
}
}}