[eluser]Maglok[/eluser]
[quote author="mjstenbe" date="1268848621"]Thanks for the input Simon. This doesnt solve the problem though.
The problem being <?php echo base_url();?> - statement in the external JS file. And thus the function not working properly. Placed in the PHP file this works fine. See an example below.
Code:
$.ajax({
type: "POST",
url: "<?php echo base_url();?>index/test/delete",
data: data,
success: function(msg) {
// // //
});
Is it really the case, that in order to use JS with PHP, it has to be contained within the same file?
Thanks,
Mika[/quote]
You did mention that you put it inside the CI dir at first, that should not work by default.
But yes define constant in the head, e voila.