Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax POST method become GET #43

Closed
ljfreelancer88 opened this issue Apr 2, 2020 · 1 comment
Closed

Ajax POST method become GET #43

ljfreelancer88 opened this issue Apr 2, 2020 · 1 comment

Comments

@ljfreelancer88
Copy link

ljfreelancer88 commented Apr 2, 2020

I have a link which deletes a record and I'm using Ajax & POST method. But PJAX "converted" it to GET method. Is there any way to tell PJAX in the API to exclude elements?

This is the simple code.

<a href="...">delete</a><!-- This link trigged by POST method AJAX -->

<div class="card-body">
<div id="pjax-container">
...content
</div>
</div>

new Pjax({
  areas: [
    '.card-body',
    '#pjax-container'
  ]
});
@ljfreelancer88 ljfreelancer88 changed the title Ajax POST become GET Ajax POST method become GET Apr 2, 2020
@falsandtru
Copy link
Owner

Use link or filter option. But anyway anchor links don't support non-idempotent methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants