I hope the following can give you some guidance:
$('#q').bind("keyup keypress", function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
if($(this).val()==''){
e.preventDefault();
return false;
}
}
});
And remove the disable attribute of your submit button.