Blockui of jquery plug-in

Source: Internet
Author: User

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...

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.