M
M
Maxim Grechushnikov2015-04-29 16:03:52
JavaScript
Maxim Grechushnikov, 2015-04-29 16:03:52

Yii2, pjax: Why can pjax duplicate GET data?

$('.setperiod button' ).click(function(e){
    e.preventDefault();

    form = $(this ).parents('form');

    $.pjax({
      timeout: 1000,
      container: '.pjx',
      fragment: '#filter_container',
      data: form.serialize()
    });
  });

When you click the "Filter" button, pjax sends data for updating. But at the same time the GET line is duplicated. what am I doing wrong?
I clicked the button
site.loc/club/1?user_id=1&date_from=20.04.2015&dat...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2015-04-29
@telray

What happens if you output form.serialize()? Are you sure you don't have duplicate fields on the form?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question