$('#form-register').change(function() {
var i_username = $('input#input-username').val();
var i_password = $('input#input-password').val();
var i_company = $('input#input-company').val();
var i_phone = $('input#input-phone').val();
$.post("home", {
username : i_username,
password : i_password,
company : i_company,
phone : i_phone,
register : 'helloworld'
}, function(return_data){
$('body').html(return_data);
});
});
ok the question maybe is on the $('body').html(return_data); can we get a specific html from the return data ? example #errordiv that contains my error list if exist then somehow append on my page ? or is there another better way to do it ?
Thanks for looking in,
Adam Ramadhan
$(return_data)will give you html structureand
$(return_data).find('#errordiv')will give you “error div” element