Post Form Keeps Making Get Request
Solution 1:
The HTML you provided submits form using POST, that's for sure. Probably you have some JS code replacing POST to GET.
Solution 2:
button_to
defaults to POST
...
it will default to performing a
POST
operation
Since you've not explicitly set your method
as GET
, this suggests you have an issue higher up the browser stack.
A clue can be found within the link_to
documentation:
Note that if the user has JavaScript disabled, the request will fall back to using GET
Specifically, that your javascript is either disabled or erroneous; a common problem which results in the functionality you're experiencing.
--
The fix is to make sure your Javascript is working properly. The simplest way to do this is to load up the "developer console", to which you'll be able to see any errors in the Javascript.
In Chrome, you can Right-Click > Inspect Element
- this will show the console
, from which you'll be able to identify any of the errors your JS is returning:
If you do that, I'll be in a better position to help you resolve any of the issues it may have.
Post a Comment for "Post Form Keeps Making Get Request"