how to pass whole data using ajax in php using keypress event -
i passing empcode using key press event, whole empcode not transfered , last digit cut.
here code:
$(document).ready(function(){ $("#e_code").keypress(function(){ //var datastring=document.getelementbyid("e_code").value; var datastring = 'e_code='+ $(this).val(); $.ajax({ type: "post", url: "getdata.php", data: datastring, cache: false, success: function (html) { $('#details').html(html); $('#custtrnhistory').show() } }); }); }); on getdata file code
write code in keyup
instead of keypress
$("#e_code").keyup(function(){
Comments
Post a Comment