Welcome Guest, Not a member yet? Register   Sign In
Prototype and Multiple Drop Downs
#1

[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.


Messages In This Thread
Prototype and Multiple Drop Downs - by El Forum - 12-25-2007, 02:23 AM
Prototype and Multiple Drop Downs - by El Forum - 12-25-2007, 08:49 AM
Prototype and Multiple Drop Downs - by El Forum - 12-25-2007, 10:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB