can I use Jquery blockui(plugin) code withouut Ajax -


im newbie jquery please help......

i have 1 page has multiple links. when user click on 1 link before completes process backside , loads page, hitting links without wait causing issue. i'm looking solution avoid user hit multiple clicks @ time.

to solve, have found jquery blockui plugin , downloaded (production version of) jquery.blockui.min.js link https://github.com/malsup/blockui/and added below code snippet

$('#linkx').click(function() {  $.blockui({ message: '<h1><img src="busy.gif" /> moment...</h1>' });  }); 

now when click on link (all links have same class name) code blocks page , display popup message "just moment", , once java process/request (default submit form action='/xxx') finishes (it process action , update database too) page refresh , automatically page unblocks. working fine. wonder using blockui feature correctly? can used without ajax, , regular java server (form action) request?

is jquery.blockui.min.js safe download , use i'm working federal company?

here have working fine java+struts1.x. im using blockui feature avoid user click on multiple links @ same time - disabling page popup message few seconds until page refreshes new data.

since im not using ajax here, there other easy solution can use or solution?

i don't claim expert, using same way on python django web-site, in order load processing-intensive page (obviously has used way, since html won't load before controller has finished processing task).

just remember include:

$(window).on('unload', function() {     $.unblockui(); }); 

in order unblock ui when page changes (or else when hit "back" button, might still see blocked page).

another old-school way "disable" links/button on page, when user clicks on one, user cannot interact while loads.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -