Capture a button onclick event from field onexit event?
Posted on 2005-04-21
I have a form that has several fields that are required to be filled, if certain other fields have values. I trigger a message box at the onexit event of these required fields, if the first field has a value and the required field doesn't contain any values. My problem is that if the user partially fills out the form, gets to one of these required fields and decides to bail out of the form (close), the onexit event of the required field is triggered before the onclick event of the close button and my popup message is displayed before the form closes. This isn't fatal, but it is annoying. Is there a way to capture the onclick event of the close button at the onexit event of the field so I can bypass the message box? I hope I have explained this clearly.