1 Reply Latest reply on Jun 29, 2009 4:55 AM by ilya_shaikovsky

    show status on page loading

    ajanz

      i got a global status defined like this

      #globalStatusDiv {
       position: fixed;
       text-align: center;
       margin-left: auto;
       margin-right: auto;
       left: 50%;
       top:50px;
       width: 150px;
       margin-left: -75px;
       height: 40px;
       line-height: 25px;
       background-color: transparent;
       padding: 2px 15px 2px 10px;
       color: #000;
       font-family: Verdana,Arial,Helvetica,sans-serif;
       font-size: 12px;
       font-weight: bold;
       z-index: 1000;
       border: 1px;
      
      }
      
      #globalStatusDiv img {
       vertical-align: middle;
      
      }
      
      <div id="globalStatusDiv" style="display:none;z-index:400">
       <img src="img/ajax-loader.gif" alt="Serverzugriff" style="z-index: 400" />&#160;Serverzugriff...
      </div>
      <a4j:status id="globalStatus" forceId="true" layout="none"
       onstart="jQuery('#globalStatusDiv').fadeIn('fast')"
       onstop="jQuery('#globalStatusDiv').fadeOut('slow')" />
      


      it is shown by every a4j:commandbutton on my page.

      how can i show it on page loading?



        • 1. Re: show status on page loading
          ilya_shaikovsky

          You could try to put inline script to the page which will call the div when page loads. But it should be defined after the div in order the div to be already available on script evaluation. And use jQuerry to catch document onload event in order to hide the div.