Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax call

$
0
0

Hi,

I use ajax call to upload file, during the upload I want to show a progress bar or ajax-loader image.

The ajax call code follows -

$.ajax({                                url: "fileHandler.ashx",                                dataType: 'script',                                cache: false,                                async: false,                                contentType: false,                                processData: false,                                data: form_data,                         // Setting the data attribute of ajax with file_data                                type: 'post',                                progress: function (e) {                                    if (e.lengthComputable) {                                        $('#stam').html('Uploading...' + Math.round(e.loaded / e.total * 100));                                    }                                },                                complete: function () {                                    $('#waitDIV').hide();                                    alert('Done');                                }                            });

How can I show a progress bar to the user ?

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>