Ajax toolbox. AsyncFileUpload control starts dom ready

I am using asp.net ajax tool set async file upload control in my page to upload images. It works fine, but on load it runs the jquery dom ready function which is completely redundant because it runs once on page load and also causes my other jquery plugins to break.

Any ideas why this is happening? I appreciate any help.

+3


source to share


1 answer


It is a little difficult to understand your problem without HTML / ASP code. But asnc file upload is as good as FileUpload hosted in the update panel as far as I think (although this is not supported, which is why microsoft created the asnc-file-upload control) Since it sends it asynchronously, EVENT released on DOM ready is not will apply on it. The pageload event is required here. I suggest you try writing jquery code for the broken elements in the pageLoad function, for example

function pageLoad(sender,args){
   //write your code for broken elements here or simply copy paste everything from  $(document).ready in this function
}

      

If the above method doesn't work, you can also tell the browser to take action when the ajax call completes, like



$( document ).ajaxStop( function() {
    //Do the needful here
});

      

Hope it helps ...

0


source







All Articles