function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sem7114Sem7114 

How to load Visualforce page fast?

<div class="demo">
 <div id="tabs">
    <ul>
      <li><a href="/apex/AccountDetailSimple?id=001A000000iTVx9">Account</a></li>
      <li><a href="/apex/EnhancedTransactionListView?id=001A000000iTVx9">Transaction</a></li>
      <li><a href="/apex/EnhancedDisputeListView?id=001A000000iTVx9" >Dispute</a></li>
      <li><a href="/apex/NotesView?id=001A000000iTVx9" >Notes</a></li>
    </ul>
  </div>
</div>

 

Here i am loading Visualforce page from href using Jquery Tab. now when i click on that Tab page is loading Good but all links are disable for few seconds. it takes a time to full load a page. here i m providing my code. So please suggest me how can i load that page fast ??? and one more thing i would like to ask is i want to put loading image still page is loading and when total page is loaded then after loading image should be disable.
SRKSRK

Try this:-

 

 <style>
    .parentDisable
    {
    z-index:1999;
    width:100%;
    height:100%;
    position:absolute;
    top:3px;
    display:none;
    left:0;
    opacity: 9.65;
    }
    .parentDisable2222
    {
    z-index:1999;
    width:600px;
    height:300px;
    position:absolute;
    top:50px;
    left:400px;
    right:600px;
    }
</style>


 

<script>

   function closediv() { hide('pop1'); } function showdiv() { pop('pop1'); } function hide(div) { try { document.getElementById(div).style.display='none'; } catch(ex) { hide('pop1'); alert(ex); } } function pop(div) { try { document.getElementById(div).style.display='block'; } catch(ex) { hide('pop1'); alert(ex); } }

<script>

 

 

<div id="pop1" class="parentDisable">
    <div id="smalldvImage" class="parentDisable2222" >
   
   <table width="100%" align="center">
    <tr align="center">
    <td width="33%">
    </td>
    <td align="center">
        <img id="img201" height="150px" align="center" src="{!URLFOR($Resource.SRK)}"/>  // I have a static resource

                                                                                                                                         name as SRK it have a

                                                                                                                                         loading GIF image
        </td>
    <td width="33%">
    </td>
        
    </tr>
    <tr>
    <td colspan="3" align="center">
            <div style="background-color: #808080; color: #FFFFFF; font-weight: bold; font-size: medium;">
            Your request is being processed, it may take few seconds.
            </div>
    </td>
    </tr>
    </table>
    
    </div>
</div>

<div class="demo">
 <div id="tabs">
</div>
</div>

<script>

  showdiv();

  var temp =  "<ul>"
temp = temp + "<li><a href="/apex/AccountDetailSimple?id=001A000000iTVx9">Account</a></li>";
temp = temp + "<li><a href="/apex/EnhancedTransactionListView?id=001A000000iTVx9">Transaction</a></li>";

temp = temp + "<li><a href="/apex/EnhancedDisputeListView?id=001A000000iTVx9" >Dispute</a></li>";

temp = temp + "<li><a href="/apex/NotesView?id=001A000000iTVx9" >Notes</a></li>";

temp = temp + "</ul>";

document.getElementById(tabs).InnerHTML =  tem;

</script>

<apex:form>

rest of VF Code....

....

....

..</apex:form>

<scripr>

 closediv();

<script>

<apex:page>