Welcome Guest, Not a member yet? Register   Sign In
passing data from AJAX to Controller
#1

[eluser]hrg.vincent[/eluser]
I tried to passing data from ajax to controller but only first 2 data will to send, the 3rd and 4th is empty. If I moved the 3rd and 4th become 1st and 2nd, then the previous 1st and 2nd become 3rd and 4th then also is not passing to controller for 3rd and 4th. Anyone can help on this?

AJAX
Code:
function loadVisaStatusFn()
{
var cs_vx_no = $('#cs_vx_no').val();
var cs_passport = $('#cs_passport').val();    
var tcs_fname = $('#tcs_fname').val();  
var tcs_passport = $('#tcs_passport').val();

$.ajax({
  type: "GET",
  url: '<?php echo site_url('ajax/getVisaStatus'); ?>/'+cs_vx_no+'/'+cs_passport+'/'+tcs_fname+'/'+tcs_passport,

  success: function(r){
   handleErrorFn(r);
   $("#rp-holder").html(r);
  }
});
}

Controller
Code:
public function getVisaStatus($cs_vx_no, $cs_passport, $tcs_fname, $tcs_passport)
{
$this->load->helper('url');
$this->load->helper('form');
  
$cs_vx_no = strtoupper($cs_vx_no);
$cs_passport = strtoupper($cs_passport);
$tcs_fname = strtoupper($tcs_fname);
$tcs_passport = strtoupper($tcs_passport);
  
$this->load->model('Data_m');
        $data['visa_status'] = $this->Data_m->getVisaStatus($cs_vx_no, $cs_passport, $tcs_fname, $tcs_passport);
$this->load->view('ajax/visa_status', $data);
}


Messages In This Thread
passing data from AJAX to Controller - by El Forum - 11-08-2013, 02:57 AM
passing data from AJAX to Controller - by El Forum - 11-08-2013, 04:41 AM
passing data from AJAX to Controller - by El Forum - 11-08-2013, 06:53 AM
passing data from AJAX to Controller - by El Forum - 11-08-2013, 03:46 PM
passing data from AJAX to Controller - by El Forum - 11-10-2013, 06:54 PM
passing data from AJAX to Controller - by El Forum - 11-10-2013, 08:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB