0

Is it possible to use element onload after a reRendering of a div?

My div: populatedChart is reRendered after a button click and is populated with data. Once the div is loaded with the data, I want to check for specific information and act upon that information. My thought was to do this with an onload function. But it is not working as I expected. So I am not sure if it is even possible. Does anyone know?

   <div class="tableOP" id="populatedChart" onload="populatedChartOnload">
      <div class="rowOP headerOP greenOP">
         <div class="cell cheaderOP panel-heading green-panel">
         This is your Report
         </div>
      </div>
      <div class="rowOP oddOP">
         <div class="cellOP companyname paddingStyleCompName" id="blankComp">
         {!bvs.Status__c}
         </div>
      </div>
  </div>

function populatedChartOnload(){                                
    if ('{!bvs.Status__c}' != 'Completed') { 
    document.getElementById("populatedChart").style.display = "none";
    } 
} 
Olivia
  • 1,843
  • 3
  • 27
  • 48

0 Answers0