E
E
Ellik2015-11-19 23:20:27
JavaScript
Ellik, 2015-11-19 23:20:27

Why does ajax pass parameters using the GET method?

$('#filterForm').submit(function(){
        $.ajax({
            type: "POST",
            url: "http://dada.ru/catalog/index/9",
            dataType: "json",
            data: {
                'filtersCheck[]': filtersCheck.join()
            },
            success: function(html){
                $("#catalog").innerHTML= '';
                $("#catalog").html(html);
            }

        });
        return false;
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wellgo, 2015-11-19
@wellgo

$('#filterForm').submit(function(q){
   q.preventDefault();
   /* your code ... */
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question