$(document).ready(function () { $("#btnUpload").click(function (evt) { /* variables */ var status = $('.status'); var percent = $('.percent'); var bar = $('.bar'); $('form').ajaxForm({ url: "FileUploadHandler.ashx", type: "POST", /* reset before submitting */ beforeSend: function () { status.fadeOut(); bar.width('0%'); percent.html('0%'); }, /* progress bar call back*/ uploadProgress: function (event, position, total, percentComplete) { var pVel = percentComplete + '%'; bar.width(pVel); percent.html(pVel); }, /* complete call back */ complete: function (data) { status.html(data.responseText).fadeIn().fadeOut(1600); } }); }); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)