$.ajax({
async: false,
url:’<?php echo base_url(‘abc/demo/sample_foo’); ?>’,
success: function(result){
if(result.responseText == true)
alert(“random text”);
else
alert(“some_other_random_text”);
}
});
In demo controller function sample_foo() returns true or false values only, but when i alert it shows “Undefined”
What can i do to retrive true and false value ?
I know nothing about php, but those quotes are going to cause issues:
rewrite as:
or