Get All Objects in Salesforce Org

We can use Schema.getGlobalDescribe() to get all properties of sObject.
Apex Class:

public class SampleController {
    Public string selectedObj{get;set;}
    Public List<Selectoption> getObjList(){
        List<Schema.SObjectType> objList = Schema.getGlobalDescribe().Values();     
        List<SelectOption> objNames = new List<SelectOption>();
        objNames.add(new SelectOption('','-- Select --'));
        for(Schema.SObjectType obj : objList)
            objNames.add(new SelectOption(obj.getDescribe().getName(),obj.getDescribe().getLabel()));
        return objNames;

Visualforce Page:

<apex:page controller="SampleController">
    <apex:form >
            <apex:outputlabel value="Object Name" for="plObj"/>      
            <apex:selectList value="{!selectedObj}" multiselect="false" id="plObj" size="1">
                <apex:selectOptions value="{!ObjList}"/>


Passing Variables from Apex to JavaScript

Sometimes we need to pass variables from apex to javascript. Here is an example to pass variables from apex to javascript. In below example I’m invoking one apex method using action function. In the apex method I’m defining the apex variable value. On complete of action function I’m invoking one javascript method and using the apex variable in the javascript method.

Visualforce Page:

<apex:page controller="SampleController">  
        <apex:outputPanel id="jspanel"> 
            function onCompleteMethod() {
        <apex:actionFunction name="afHelloWorld" action="{!HelloWorld}" rerender="jspanel"/>
        <apex:commandButton onclick="afHelloWorld();" oncomplete="onCompleteMethod()" value="Click me"/>

Apex Class:

public class SampleController {
    public String message {get;set;}
    public pageReference HelloWorld() {
        message = 'Hello World!!';
        return null;

Display Standard Salesforce Help Text on Visualforce Page

        .vfHelpText a            {position:relative;}
        .vfHelpText a span       {display: none;}
        .vfHelpText a:hover span {display: block;
        padding:2px 5px;
        left:-15em; width:15em;
        border:1px solid orange;
        .helpOrb {
        background-image: url(/img/help/helpOrbs.gif);
        background-position: 0 0;
        width: 20px;
        height: 15px;
        .helpButtonon .helpOrb {
        background-position: top right;
        .helpButton .helpOrb {
        background-position: top left;
    <span class="vfHelpText">
        <apex:outputLink value="javascript:return false;">
            <img src="/s.gif" alt="" class="helpOrb" />
            <!--s.gif image is standard image no need to upload anywhere-->