[eluser]Ivoo[/eluser]
OK, this is weird. I have an jQuery ajax call-back to my CodeIgniter controller. A month ago, this worked fine. But now it stopped working. The problem is that the controller-function is not reached.
Also, it is not a routing problem. When I manually point my browser to the my callback function (repository/asm), it works fine.
I suspect that I unknowingly changed some configuration, or some setting. But what?
Any suggestions?
jQuery:
Code:
$.ajax({
type: 'POST',
url: "repository/asm",
async: false,
data: { mediaID: mediaID },
success: function(jsonData){
data = $.parseJSON(jsonData);
$('#innerImageFrame img').attr("src",data.uri);
$('#titleFrame').html(data.titleInArchive);
$('#commentFrame').html(data.commentInArchive);
$('#yearselect').val(data.yearselect);
$('#monthselect').val(data.monthselect);
$('#dayselect').val(data.dayselect);
$('#starRating').raty('start', data.starRating);
}
});
CodeIgniter:
Code:
<?php // if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Repository extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->helper('url');
$this->load->model('ifm_media_model');
// $this->load->model('news_model');
}
public function asm()
{
log_message('debug', '*** asm (ajax callback) (repository.php) was called');
// .. other code, but the above message is already never logged