[eluser]obay[/eluser]
Hi all,
I'm trying to use the
of JQuery but it's not retrieving the values. This used to work when I didn't use CI.. (this is my first time using MVC for PHP). I suspect that it's because of the MVC structure that is causing the problem. Can you take a while to look at my code?
my controller:
Code:
function bug_add($review_id) {
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<response>';
echo '<bug>data</bug>';
echo '</response>';
}
my view:
Code:
$("#button_add").click(function(e) {
$.post(
"review/bug_add/<?=$review_id?>",
{
//some values here
},
function(xml){
$(xml).find("bug").each(function() {
alert( $(this).text() ); //this never gets called
});
},
"xml"
);
});
If I remove the "xml" from the $.post(), the data are retrieved.
What do you think is wrong?
Thanks for your time