0
I wanted to know how to send the message and the input continue selected so I can continue writing.
My code is:
$(document).on('onkeyup', '.input', function(e) {
        var message = $(this).val('');
           if (e.keyCode == 13 && message != ''  && projeto_id != '') {
               $(this).val('')
               var dataStr = "&message=" + message + '&projectId=' + projeto_id;
               $.ajax({
                   type: "POST",
                   url: "/sendMessage",
                   data: dataStr,
                   cache: false,
                   success: function(data) {
                   },
                   error: function (jqXHR, status, err) {
                   }, 
                   complete: function() {
                   }
               })
           }
onkeyupis wrong, the correct iskeyup;var message = $(this).val('');is wrong, the correct isvar message = $(this).val();– Valdeir Psr