+ Start a Discussion
Meenakshi sinhaMeenakshi sinha 

popup in visual force page

I am weak in javascript, my requirement is to show a popup in visual force page which will display all account names and I select acocunt name.
I am editing account records.

any help is greatly appreciated.

Check this - http://www.infallibletechie.com/2012/07/inner-popup-in-salesforce.html
salesforce mesalesforce me
Hi Meena check this once...
<apex:page controller="tstpopup">
    <apex:form >
        <apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="tstpopup"/>
        <apex:pageBlock >
            This is just filler text from the Salesforce General. 
        <apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
                This is where I would put whatever information I needed to show to my end user.<br/><br/><br/>
                <apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="tstpopup"/>
    <style type="text/css">
            background-color: white;
            border-width: 2px;
            border-style: solid;
            z-index: 9999;
            left: 50%;
            position: absolute;
            /* These are the 3 css properties you will need to change so the popup 
            displays in the center of the screen. First set the width. Then set 
            margin-left to negative half of what the width is. You can add 
            the height property for a fixed size pop up if you want.*/
            width: 500px;
            margin-left: -250px;
            opacity: 0.20;
            filter: alpha(opacity = 20);
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 9998;

public class tstpopup {     

    public boolean displayPopup {get; set;}     
    public void closePopup() {        
        displayPopup = false;    
    public void showPopup() {        
        displayPopup = true;