Ajax loader on file upload action -
i configure kind of ajax loader action executes file upload. once file quite large (excel more 2000 rows), takes sometime processed , quite unpleasant user, wait no other feedback displayed browser.
for me, ideal solution, blocking popup, displaying message "processing file..." (or that), prevent users upload file in meantime.
well... i've got in place on symfony app although doesn't relate symfony:
template:
<input type="submit" class="jq-upload" value="upload" /> // submit button <div class="jq-loader"></div> // empty div loader image js:
$(document).ready(function() { $(".jq-upload").click(function() { $(".jq-loader").addclass("jq-load-icon"); }); }); css:
.jq-load-icon {width: 16px; height: 16px; background: url('../images/loader.gif') no-repeat;} so, click on upload button adds class empty div next it, has animated gif background image. in case, it's typical loading icon.
that should give enough create popup or adjust needs.
Comments
Post a Comment