Activity Forums Salesforce® Discussions How can i make a callout(automatically) on VF page load?

  • Manpreet

    Member
    May 22, 2017 at 6:23 am

    Hi suraj,

    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(){
    ..................
    ..................
    }
    }

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos