Welcome Guest, Not a member yet? Register   Sign In
Short look why, please: JQuery UI autocomplete from database
#2

[eluser]pickupman[/eluser]
jQuery UI doesn't support POST by default and "method:" is not an option for the autocomplete widget. Previously before GET was allowed in CI, you could use a callback for source. Just change your controller to use:
Code:
$keyword = $this->input->get('term');

If you would rather use post you will need to create the callback to look like:
Code:
source: function(req, add){
            
            var fields = $("#groups").val(); //Get input
                $.ajax({
                    url: '<?php echo site_url('accounting/booking_set_ajax_groups');?>',
                    dataType: 'json',
                    type: 'POST',
                    data: fields,
                    success: function(data){
                        add(data);
                    }
                });
}


Messages In This Thread
Short look why, please: JQuery UI autocomplete from database - by El Forum - 01-28-2012, 08:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB