is there any way to display ajax response into input field? thanks
Yes.
Using jQuery this looks like:
$.ajax({
url: '/test.php',
success: function(data) {
$('#your-input').val(data);
}
});
check this : jQuery.ajax()
$("id").val(
$.ajax({
url: "script.php",
global: false,
type: "POST",
data: ({id : this.getAttribute('id')}),
dataType: "html",
async:false,
success: function(msg){
alert(msg);
}
}
).responseText);