hi all,
I have a small but very vital issue regarding syncronization of execution of onblur and onclick event handler in javascript.
Actually I have a html form containing one text box and one submit button. onblur is put on textbox this handler executes a method called ajexValidation(). Submit button is associated with onclick hndler which executes ajexSubmitData(). Ajex handler is used in both cases, because onblur the enterd date goes to validate itself from a remote server and retrun back a validated data and assign the data in text field.
In the case of onclick handler submits validated data to remote server for enquiry of other details.
This is the common flow of the page.
But there is some problem..
When user clicks the submit buton first onblur fired then onclick.
Now data is under validation process on the server and onclick starts executing ajexSubmitData() which causes issues because process is - first validate dat-then send validated data to server for enquire, You can say the even syncronization problem.
So all I need is to trace the onblur method completion notification and suspend the onclick methed from execution and wait for that notification. Once get the notification then fire ajexSubmitData().
Any help will be highly appriciated,
-rajneesh