Skip to content

How to disabled the form controls until process completed, i

chitrakant

Asked May 20, 2013, 8:07 PM EDTSolved
Share
LinkedInX
i used the UpdateProgress for display the process message (ex. plz wait..) to the user until server take time for processing and here i also used ModalPopupExtender to disabled the  the form and it's controls until the server processing is completed and when the process is completed then the ModalPopupExtender is auto hide and the disabled form status is changed to enabled. And it is work fine in Google Chrome, Mozilla Firefox etc. but does not work fine in Internet Explorer 8, Internet Explorer9 here when i click any button in form then until the process running UpdateProgress is work but the ModalPopupExtender doen not disabled the form and it's controls and user can easily click the other controls of the form. but in case of Google Chrome, Mozilla Firefox etc user can't interact with the form control until the process is completed.

i used the following code for this plz check it 

     

   


   
   
   
           
                Plz Wait...
           
       
   
   

   


code of "jsUPIndex.js" file 

Code
> Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);
>
> function beginReq(sender, args) {   $find(ModalProgressIndex).show();
> }
> 
> function endReq(sender, args) {   $find(ModalProgressIndex).hide(); }

do i need to add extra script here. plz give me solution for this

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Sunny  Sharma
    ✓ Accepted answer0
    You can add below codes to your "jsUPIndex.js" file.

    Add this inside beginReq(...){}

    var limit = document.forms[0].elements.length;
    for (i=0;i<limit;i++) { document.forms[0].elements[i].disabled = true; }



    and this inside endReq(...){}
    var limit = document.forms[0].elements.length;
    for (i=0;i<limit;i++) { document.forms[0].elements[i].disabled = false; }


    Not to mention that if you've more than one form then set the index parameter in  form[...] as desired.


    Hope this helps!!

    Happy Coding :)
    0
  • 0
    Thank u very much for this code, this working fine..
    0
  • Sunny  Sharma
    0
    I'm glad I could help. Cheers !!
    0