The event handler can sort out your issue in this. I had created a demo service on my site to upload files by the users. I had tried the same by allowing a bunch of users to upload files at a single time. The sample code which I used in my site is posted below. So you can have a look for the below code and get a idea about the function.
HTML Code:
* Auxiliary function for event handling
* @ Access public
* @ Param object element, which triggers the Event Object
* @ Param string type, which comes into question EventHandler
* @ Param string callBack, callBack function that handles the event
* @ Param object returnParams optional return parameter
* @ Return object event;
Html object * @ return object;
* /
event handling function (element, type, callBack, returnParams) (
/ *
* Set event handler
* /
var returnParams = returnParams;
if (document.addEventListener) (/ / good browsers
if (type.match (/ ^ on /)) type = type.replace (/ ^ on /,"");
element.addEventListener (type, handleEvent, false);
) Else (/ / IE
if (! type.match (/ ^ on /)) type = "on" + type;
element.attachEvent (type, handleEvent);
)
function handleEvent (evt) (
var event = | | evt window.event;
var target = evt.srcElement | | evt.currentTarget;
callBack.call (callBack, event, target, (returnParams)? returnParams: null);
)
)
Bookmarks