Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSS:
- div.ajax-progress {
- //some setting and url
- }
- <body>
- <div class="ajax-progress"></div>
- </body>
- Javascript:
- $('#fileToUpload').on('change', function(e) {
- var file = e.target.files[0];
- var formData = new FormData($('form')[0]);
- imageId = cornerstoneWADOImageLoader.fileManager.add(file);
- $.ajax({
- url: 'loadfile.php',
- type: 'POST',
- data: formData,
- async: false,
- dataType: 'json',
- timeout : 60000,
- beforeSend :function(){
- $(".ajax-progress").show();
- },
- success: function (html) {
- $(".ajax-progress").hide();
- //doing something}
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement