I am currently facing some order duplication issues. Without going into too much detail, I had a question about the following. Is there any possibility that this can trigger a submit twice?
<button type="submit" onclick="review.save()"></button>
review.save()
will handle the submission of the form - so in fact the type=submit isn't needed here. But I want to establish whether this CAN cause the browser to submit twice. On the server logs the 2 submits were about 10 seconds apart.
You need to prevent default browser behaviour, for example:
Add a
return false
to your Button or better the 'oncklick' event!Like:
It "stops" the default browser behaviour of following links (in that case).
Edit: To slow :/