Post by haosmark » Sun Dec 30, 2012 9:34 am

Code: Select all

function submitSettings() {
    $('.forms').each(function() {
        posted = $(this).serializeArray();
    console.log('<?php echo $this->session->data["token"]; ?>');
//    $.post('<?php echo $action; ?>', posted);

        type: 'POST',
        url: 'index.php?route=module/my_module/test&token=<?php echo $this->session->data["token"]; ?>',
        data: posted,
        dataType: 'json',
        success: $('#text-me').html(<?php echo $success; ?>),
        error: function(jqXHR, textStatus, errorThrown){
            // log the error to the console
            console.log("The following error occured: " + textStatus, errorThrown);
I'm collecting a bunch of data of forms then send them to test function, but I'm receiving "500 (Internal Server Error) "
test() is located right after index() and this is what it looks like:

Code: Select all

    public function test() {
//        $this->load->library('json');
//        $json['success'] = 'This is the returned results from color_adjust.php';
        $this->data['success'] = 'This is the returned result';

New member


Wed Oct 10, 2012 1:59 am
Who is online

Users browsing this forum: Bing [Bot] and 11 guests