We have a HTML screen that is formed by including the two sections below:
Footer - A bar with icons that includes an Update button. The update button has the onmousedown event associated with it. When the Update button is clicked the data present in the Body is saved in the database.
Body - HTML form with 2 input fields. Each of these fields has an onblur event associated with it. The OnBlur actions consists of validations that must be run prior to running the Update action.
The problem is that sometimes the OnMouseDown event and henceforth the Update action is getting triggered prior to running the actions associated with the OnBlur events. This is causing the validations that are bound with each field to be run after the Update is performed.
This behaviour is occurring when I am on one of the Body fields (so the focus is on one of the Body section fields) and I click on the Update button.
What are your suggestions to solve this problem?