function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken KoellnerKen Koellner 

Disabling page (masking) while AJAX request is running on VF

What I'd like to do is disbable my entire VF page while an ajax request is running.  Not unlike opening a modal dialog box except there'd be no close button (except maybe a cancel).  I'm wondering if there's an example around using jQuery or extjs or something like that.  Here's the idea.


There an onchange= on a field.  That runs a javascript.  The javascript does something to disable the page using some standard library and puts up a message box, not unlike a modal dialog box, that says something like "Processing".  The javascript then calls an apex:actionFunction.


The oncomplete- on the actionFunction runs another javascript.  That javascript takes down the message box and reenables the page.


The big difference between this an a model dialog box is the user doesn't click a button to close the box.  The oncomplete does that.  I've seen examples using jQuery of doing something with a modal window but I want the script to be able to close it.


Anyone have an example of anything like that?







check out and look for the dialog


to close you would just use the selector and pass close: j$("[id$=yourid]").dialog('close');


the only issue i see is that the user can close the dialog by clicking the x. you can control what buttons if any are displayed. you can control esc behaviour etc. While not part of the jquery dialog, you may be able to use some CSS to hide the x for close.......or you may have to lovee with the fact that they can close it.


You can display a processing message in the dialog to entice the user to wait if you like.






I have similar requirement but little difference. I have a visualforce page with differece radio buttons.

On radio button selection a webservice will be called and data displayed  on the VFpage, but durig this process, i want to restrict the user not to select another radio button.



Because it makes another webservice call if you change the radio button before getting the first webservice call response.


Is there a way to mask the user not to select another radio button while first action is in the process.

I dont want to display modal dialog box. Can we achieve this JQuery?