Print this page

Creating custom button that looks like the standard dropdown button "Manage External User"

Knowledge Article Number 000199193
Description I want to create a drop down button where we have values on the button itself. The button look similar to the standard salesforce menu list buttons. 
Resolution

 
The below mentioned sample code can be used to create a drop down button where we have values on the button itself. This creates a button that is quite similar to the standard salesforce menu list buttons. 

<apex:page >
<apex:outputPanel style="padding-left: 3em;"  >
    <div class="menuButton" id="Actions"><apex:outputPanel layout="none">
        <div class="menuButtonButton" id="ActionsButton"><span class="menuButtonLabel" id="ActionsLabel">Actions</span></div>
 
        <div class="menuButtonMenu" id="ActionsMenu"><apex:outputPanel layout="none">
            <apex:outputLink value="#">Menu Link #1</apex:outputLink>
            <apex:outputLink value="#">Menu Link #2</apex:outputLink>
            <apex:outputLink value="#">Menu Link #3</apex:outputLink>
        </apex:outputPanel></div>
    </apex:outputPanel></div>
</apex:outputPanel>
 
<script type="text/javascript">new MenuButton('Actions', false);</script>
</apex:page>




promote demote