• janu
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

In a visualforce barchart, we need to be able to put a label on top of each bar which reads the peakvalue of that particular bar

  • October 03, 2012
  • Like
  • 0

In a visualforce barchart, we need to be able to put a label on top of each bar which reads the peakvalue of that particular bar

  • October 03, 2012
  • Like
  • 0

I have a page that does a dynamic update.  This update takes 4 seconds, so I thought it would be super cool to implement the jQuery blockUI to block the page to let the user know that something is happening behind the scenes.  Here's my code that I cannot get to work.

 

<apex:page controller="EndOfTermController"> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"/> 
<apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery.blockUI.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery.jquery-ui-1.8.20.custom.min.js')}"/>
<apex:form > 
   <apex:actionFunction name="SupressLetter" action="{!suppressLetter}" rerender="out" status="loading">
     <apex:param name="firstparam" assignto="{!selSupLetterID}" value="" /> 
   </apex:actionFunction>
   <apex:actionStatus id="loading" onstart="loading(true)" onstop="loading(false)" />
 
       
  
  <div class="contentLoaded">  
 
  <!-- LOTS OF PAGE CONTENT  HERE -->

  </div>
</form>
</apex:page>


 Here is the script on the page:

 

<script type="text/javascript">
  var j$ = jQuery.noConflict();
  var val;
  
  function loading(val) {
  
    if (val) {    
      alert("Hello! I am an alert box!!"+ val);
      j$('.contentLoaded').blockUI();
      //j$('div.contentLoaded').block({ message: null });
      //document.getElementById('contentLoading').style.display = 'block';
      //document.getElementById('contentLoaded').style.display = 'none';
    }
    else {
      
      alert("Hello! I'm the else!!" +val);
      j$('.contentLoaded').unblockUI();
      //j$('div.contentLoaded').unblock({ message: null});
      //document.getElementById('contentLoading').style.display = 'none';
      //document.getElementById('contentLoaded').style.display = 'block';
    }
  }
</script>

Has anyone successfully used the blockUI function to work on a visualforce page?

 

Thanks,

Suzie