• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

disable a page

Upon clicking a submit button, I want to disable an entire page.  it's a modal dialog.  Is there is easy way to do this?  
0
HLRosenberger
Asked:
HLRosenberger
  • 4
  • 4
1 Solution
 
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
what do you mean with  "disable" ... invisible ? overlayed ? unclickable ? ...
0
 
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
If there is not any other special effect expected ,you can use any of usage from here :http://jquery.malsup.com/block/#demos
0
 
HLRosenbergerAuthor Commented:
unclickable.  prevent the user from interacting with the page.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
<script src="https://github.com/malsup/blockui/raw/master/jquery.blockUI.js" type="text/javascript"></script>

and

$(document).ready(function() {
    $('#demo7').click(function() {
        $.blockUI({ message: null });
 
        setTimeout($.unblockUI, 9000000);
    });
});
0
 
HLRosenbergerAuthor Commented:
So, are saying put this script behind the click of my save button?


$(document).ready(function() {
    $('#demo7').click(function() {
        $.blockUI({ message: null });
 
        setTimeout($.unblockUI, 9000000);
    });
});
0
 
HLRosenbergerAuthor Commented:
Also, the link talks about JQuery.  I'm not using JQuery.
0
 
Erdinç Güngör ÇorbacıPHP Development Team LeaderCommented:
then you have to manally get all user inputs with something like this

var page_disabled;
window.onclick= return check_disabled();



function check_disabled(){
global page_disabled;
if(page_disabled==1) return false;
else return true;
}

and for disabling

function disable_page(state){
global page_disabled;
page_disabled=state;
}

anytime you want to disable call disable_page(1) , or to disable send 0



this is just an logic example and not tested ... you need to check all user inputs like douleclicks rightclicks keypress .... and return function .
0
 
HLRosenbergerAuthor Commented:
This will work but I was looking for something easy..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now