Is there a way to have a JavaScript event or check see if a su开发者_运维知识库bmitted form got as response status HTTP 204?
Short answer: If it's a regular <form>
submit, no.
You can only detect the response code if you use XHR.
Not possible if not Ajax form submit. In this case logic needs to be handeled on the server and redirect to appropriate page.
精彩评论