I want to access the returned boolean of my function on another function.
$('.asset_edit').change(function(){
var asset_id=$(this).attr('id');
var asset=$("#"+asset_id).val();
var dataString = "device="+device+"&asset="+asset;
$.ajax({
type: "POST",
url: "<?php echo site_url('c_device/check_assetCode'); ?>",
data: dataString,
cache: false,
success: function(html){
if(html)
return true;
else
return false;
}
});
});
Is there a way where I could access the "return true or return false" on my $(".edit_tr").click(function() function?
In Javascript you just call the certain function name but in jQuery, I have no idea how to.