T. Huy Nguyen wrote:Agree with you. But IMO, it's the most straightforward.
Taking it easy during development at the expense of the end user is not a good strategy or practice.
An alternative would be returning false when onclick occurs:
A much better approach.
And I'm fairly sure this is the poster's problem. The form is most likely being submitted by its default action, as well as being submitted by script.