I usually print an AJAX response on a div or span. My question is if I can make my result show in an input text.
Example:
$(document).ready(function() {
$('#form, #foo').submit(function() {
$.ajax({
type: 'POST',
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(data) {
$('#result').html(data);
}
});
return false;
});
});
After my success my result is on a div.
Can I change to an input text within a form?