get a spesific html on return jquery ajax post -


$('#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 question maybe on $('body').html(return_data); can specific html return data ? example #errordiv contains error list if exist somehow append on page ? or there better way ?

thanks looking in,

adam ramadhan

$(return_data) give html structure

and $(return_data).find('#errordiv') give "error div" element


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -