anusha(salesforce developer)

Saturday, 17 September 2016

page OnLoad function in visualforce

OnLoad function in visualforce

Method 1:

<script type = "text/javascript">
    window.onload=function()       
    {        
        alert("Hi");
    };
</script>

Method 2:

Visuaforce page:

<apex:page action="{!onLoad}">

</apex:page>


Controller:

public class sample {
        public sample(){
        }

        public void onLoad(){

            .
        }
}

No comments:

Post a Comment