1 <apex:page controller="OverlayDemoController"> 2 <head> 3 <c:Overlay style="processing" /> 4 </head> 5 <apex:form> 6 <apex:actionStatus id="overlayStatus" onStart="showOverlay();" onstop="hideOverlay();"></apex:actionstatus> 7 <apex:sectionHeader title="Contact Save" subtitle="Overlay Demo" /> 8 <apex:pageBlock id="pBlock"> 9 <apex:pageMessages></apex:pageMessages> 10 <apex:pageBlockButtons> 11 <apex:commandButton action="{!saveRecord}" status="overlayStatus" value="Save" reRender="pBlock"/> 12 </apex:pageBlockButtons> 13 <apex:pageBlockSection> 14 <apex:inputField value="{!cnt.First_Name__c}" /> 15 <apex:inputField value="{!cnt.Last_Name__c}" /> 16 <apex:inputField value="{!cnt.Phone__c}" /> 17 <apex:inputField value="{!cnt.Email__c}" /> 18 </apex:pageBlockSection> 19 </apex:pageBlock> 20 </apex:form> 21 <div id="overlay"></div> 22 </apex:page>