jquery-pjax icon indicating copy to clipboard operation
jquery-pjax copied to clipboard

fix get fallback

Open easonyq opened this issue 11 years ago • 1 comments

This fix a problem when GET method comes to fallbackPjax. Usually in GET method, we tend to use

{
    url: '/?a=1&b=2'
} 

rather than

{
    url: '/', 
    data: 'a=1&b=2'
}

But any parameters written in action attribute of <form> element with GET method will be ignored. e.g.

<form action="/?a=1&b=2" method='GET'>

is equivalent to

<form action="/' method='GET'>

Thus we need to add these parameters using hidden input.

easonyq avatar Aug 04 '14 03:08 easonyq

Thanks. I'd like to see a failing test for this first that this commit fixes.

mislav avatar Sep 15 '14 21:09 mislav