JQuery 1.5 ajax sends GET data to POST

(Sorry for my English, this is not my native language) I have a project that uses codeigniter + JqueryUI. I was thinking about upgrading from jQuery to 1.5, mainly because I use a lot of ajax calls, and any speed improvement is much appreciated. So, this is my code that works fine in jQuery version 1.4.4:

$("#nome_produto").autocomplete({
            source: function( request, response ) {
                $.ajax({
                    async:false,
                    url: "<?php echo site_url("produtos_produto/json_produtos/f") ?>",
                    dataType: "json",
                    type: "POST",
                    data: request,
                    success: function( data ) {
                        response( $.map( data, function( item ) {
                            return {
                                label: item.label,
                                value: item.label,
                                cod: item.cod
                            }
                        }));
                    },
                    beforeSend:function(){
                        $("#nome_produto").toggleClass("loading");
                    },
                    complete:function(){
                        $("#nome_produto").toggleClass("loading");
                    }
                });
            },
            minLenght:3
        });

In JQuery 1.5, I got a 404 error, but the requested URL is: http://myurl.com/produtos_produto/json_produtos/f?callback=JQUERY_hashofnumbers , although this is a mail request. Does anyone know why this is happening?

+3
source share
2 answers

: http://bugs.jquery.com/ticket/8084 :

  jQuery.ajaxSetup({ jsonp: null, jsonpCallback: null});

ajax

+5

Django, , , URL '/'

URL-, '/', , Django URL '/' ( Django).

javascript '/' POST-. ( URL-). apparantly POST GET (., , fooobar.com/questions/671504/...).

+2

All Articles