Our application uses client side validation, previously they have written similar validation code for all input controls in HTML. In the 'onblur' event of an input control, it checks if it is a required field and shows a 'x' cross image beside the control.
So, now the problem is with the file control.
when the user clicks on the 'browse' button the cross mark is appearing beside the input file control, even before the user's action of selecting a file is completed ( the browse window is still open) so it looks awkward.
Now want we want is, when the user clicks on the 'Browse' button we don't want to do validation, and when the user just pass away from the control by using tab (or mouse), we want to show the cross image (i.e. validation)
but when I tried to trace the event, on both occasions I am getting 'onblur' event.
when the user clicks on the 'Browse' button, first 'onblur' is getting called and then 'onclick', so I am unable to distinguish these two cases.
So is there any way out, I have few points in mind
1) can I know (with some property or event handling mechnism) when the user clicks on the 'browse' and when he just passes away from the control
2) or can we have access to event queue of IE, my view is, in the second case when the use clicks on the 'browse...' button 'onblur' and 'onclick' is getting called one after the other, so if in 'onblur' event if we are able access the event queue and know that 'onclick' is in the queue then we can make it.
Last edited by prashantSum; 17Nov2006 at 18:57..