File upload using jQuery and CodeIgniter (but update is not updated)

I am creating a web application for my friend. He wants this application to be a “desktop” application, which means “page refresh” in general. So, I decided to create this application using CodeIgniter, jQuery, jQuery UI and MySQL. This main application window contains several tabs, each tab has your own content div.

All page requests, form submission, action, and others are jQuery descriptors for retrieving data. Then this data will be sent to a specific controller for processing and response with the corresponding representation

For example, a form submission ...

//JavaScript
$('#submitButton').live('click',function(){
    var data = $('#form').serialize();
    $.post('someController/someMethod', data, function(data){
        $('#someTargetDiv').html(data);
    })
})

//Controller
function someMethod(){
    var data1 = $this->input->post('data1');
    var data2 = $this->input->post('data2');
    var data3 = $this->input->post('data3');
    var data4 = $this->input->post('data4');

    /* some data handling code */

    $this->load->view('someView',data);
}

, .
1. "$ (" input [type = file] "). val(), " Drive:/fakePath/fileName.extension ".
2. " $('# form "). Serialize(), " name = value1 & lastName = value2 &..." )

CodeIgniter do_upload(). ( ), .
, .
, , - . ( 1. )

, , - ( ). (, ) . , .

( , , , , )

. , google .
, .

P.S. . , - .

+2
1

jquery.post() - , "". , () javascript ( - ff 4, ).

, , : http://jquery.malsup.com/form/

iframe, . , .

+1

All Articles