+ Start a Discussion
yvk431yvk431 

jQuery BlockUI

Hi 

 

I dont know this is the correct to ask this question , but i've already posted about this in vfp board but it didnt got any response. I hope some from this board will respond.

 

I am facing a wierd issue, i am using jQuery blockUI ,unblockUI for button click and picklist actions. 

It was working fine since an year, to my sirprise its throwing script errors for a few profiles since last week. 

 

For other profiles still its working fine . I verified the VFP,controller permissions. Compared the other possible areas like fls, CRED but I didnt able to figure it out. I am getting 'Error:' Type Error: jq.blockUI is not a method or property' and the navigation stops just there . 

 

 

I am using the below script for block and unblock

 <script type="text/javascript">       
        var jq = jQuery.noConflict();
        function ShowProcessingImg() 
        {
            try 
            {
                jq.blockUI({ message: '<h1>Please wait</h1>', css: { 
                    border: 'none', 
                    padding: '15px', 
                    backgroundColor: '#000', 
                    '-webkit-border-radius': '10px', 
                    '-moz-border-radius': '10px', 
                    opacity: .5, 
                    color: '#fff' 
                } }); 
                
            } 
            catch(ex)
            {
                alert(ex);
            }
        }
        function HideProcessingImg()
        {
            try
            {
                jq.unblockUI(); 
            }
            catch(ex)
            {
                alert(ex);
            }
        }    
    </script>

 

Using the below jQuery versions

jQuery JavaScript Library v1.4.1

jQuery blockUI plugin  Version 2.31 (06-JAN-2010) (malsup.com)

 

Let me know how to fix this or atleast where i have to look at.

 

Thanks

yvk

yvk431yvk431

The same code was working fine in my developer instance, but not in my clients org. Also the issue limits only to developer sandbox and its working fine in all other instances including production. 

<apex:page standardController="Opportunity"   id="page" showHeader="True" sidebar="True" tabStyle="Opportunity" >

   <apex:includeScript value="{!$Resource.JQueryFile}" />
    <apex:includeScript value="{!$Resource.JQuery_Block_UI}" />
    <apex:form id="form1" > 
    
        <!--  Component to display the processing message and freezes the screen while in operation -->
        
       
       <apex:pageBlock id="pageblock" > <!--Page Block Starts-->
           <apex:outputPanel id="opnl">
                    <apex:pageBlockSection title="Filter Criteria" id="pbsFilter" columns="1">                    
                        
                                                       
                    </apex:pageblockSection>
             </apex:outputPanel>       
                    <!--  button to perform filter search -->
                    <apex:pageblockButtons >
                    <apex:commandButton value="Search" reRender="opnl,pbsFilter" id="theButton2"  onclick="ShowProcessingImg();"  />                            
                    </apex:pageblockButtons>
    
          
  </apex:pageblock><!--Page Block End-->
    <script type="text/javascript">
      var jq = jQuery.noConflict();
        function ShowProcessingImg() 
        {
            try 
            {
                jq.blockUI({ message: '<h1>Please wait</h1>', css: { 
                    border: 'none', 
                    padding: '15px', 
                    backgroundColor: '#000', 
                    '-webkit-border-radius': '10px', 
                    '-moz-border-radius': '10px', 
                    opacity: .5, 
                    color: '#fff' 
                } }); 
                
            } 
            catch(ex)
            {
                alert(ex);
            }
        }
        function HideProcessingImg()
        {
            try
            {
                jq.unblockUI(); 
            }
            catch(ex)
            {
                alert(ex);
            }
        } 
  </script>         
  </apex:form>
  

  
  </apex:page>

 

 

I am clueless about this wierd behaviours.