[eluser]ccachor[/eluser]
So I'm doing some drop downs but I can't seem to get my controller to accept the post value from my form. Here's what my jscript looks like
Code:
function getModels(){
var url = 'http://localhost/dropdown/getModels/';
var pars = $F('make');
var myAjax = new Ajax.Request(url, {
method: 'post',
parameters: pars,
onSuccess: successModels
});
}
My controller
Code:
function getModels()
{
$make = $this->input->post('make');
$data['query'] = $this->db->query('select distinct model from inventory where make = "$make" ');
$this->load->view('dropdowns/models', $data);
}
In Firebug the post displays what I want it to but for some reason it won't set for the SQL. I'm thinking it has something to do with the URI stuff or something. I can't figure it out! BTW my select id in my html is all correct. Just think it has something to do with CI.