Blockui
The plug-in is used for Ajax
Simulate locking the browser during synchronous transmission during operation. When it is activated, it will prevent users from interacting with the page (or part of the page) until it is canceled.
Blockui
To prevent the user from interacting with the browser.
This jquery plug-in is mainly used to prevent users from submitting forms multiple times and displaying a waiting page (or prompt information) after submission ).
You can add a "cancel" button in the pop-up box. When the user cancels the operation, the background asynchronous data is obtained and aborted! The document contains the following sample:
<MCE: Script Type = "text/JavaScript"> <! -- </P> <p> $ (document ). ready (function () {</P> <p> $ ('# test '). click (function () {<br/> $. blockui ({message: $ ('# question'), CSS: {width: '275px '}}); <br/> }); </P> <p> $ ('# Yes '). click (function () {<br/> // update the block message <br/> $. blockui ({message: "<p> Remote Call in progress... </p> "}); </P> <p> $. ajax ({<br/> URL: 'Wait. php', <br/> cache: false, <br/> complete: function () {<br/> // UnB Lock when remote call returns <br/> $. unblockui (); <br/>}< br/>}); </P> <p >$ ('# no '). click (function () {<br/> $. unblockui (); <br/> return false; <br/>}); </P> <p >}); <br/> // --> </MCE: SCRIPT> </P> <p>... </P> <p> <input id = "test" type = "Submit" value = "show dialog"/> </P> <p>... </P> <p> <Div id = "Question" style = "display: none; cursor: Default" mce_style = "display: none; cursor: default "> <br/> <H1> wocould you like to contine ?. </H1> <br/> <input type = "button" id = "yes" value = "yes"/> <br/> <input type = "button" id = "No" value = "no"/> <br/> </div>
For reference...