function new_review(){
$.post('restaurant_profile/get_dg_new_restaurant_review', {}, function callback(response) {
alert(response);
}
}
Hi I have a function that does an jQuery ajax post to a controller function. The function outputs a simple string using the PHP echo
function.
The function works fine if I don't have any URI segments after the controller name in initial page load.
ex: mysite.com/index.php/test_controller/
If for example the page was loaded with a index function and the URI segment contained the index function
ex: mysite.com/index.php/test_controller/index
The response from the controller is all of the string output from the index function.
this is entire page HTML. I only want the text from the et_dg_new_restaurant_review
function
Does anyone know how to fix this?