function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
StaciStaci 

pop-up window on button click to enter Status / Substatus

I know there is a way to pop-up a box when a button is clicked with an alert, is there a way to also add fields to that pop-up to have the user fill in?

Best Answer chosen by Admin (Salesforce Developers) 
Sri549Sri549

Hi Staci

This may solve your requirement...

 

<apex:page standardController="Opportunity" extensions="extQuoteselection">   
    <apex:form id="frm">        
      <apex:detail subject="{!Opportunity.Id}" relatedList="false" title="false"/> 
        <apex:outputPanel id="tstpopup" rendered="{!IF(isDisplayPopUp ==true,true,false)}" >  
            <apex:outputPanel styleClass="popupBackground" layout="block" />
            <apex:outputPanel styleClass="custPopup" layout="block">                 
                    <apex:pageMessages ></apex:pageMessages>
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td >
                                <apex:outputLabel style="font-weight:bold;" value="Select Quote Properties: "></apex:outputLabel>
                            </td>                                                       
                        </tr>
                    </table>     
                    <br/>                              
            </apex:outputPanel>                        
        </apex:outputPanel>
    </apex:form>
    <style type="text/css">
        .errorMsg{
            width:159px;
        }
       .custPopup{
           background-color: white;
           border-width: 3px;
           border-style: solid;
           z-index: 9999;
           left: 50%;
           padding:10px;
           position: absolute;           
           width: 340px;
           //margin-left: -80px;
           top:100px;
           margin-left: -170px;
           //top:305px;           
          border-radius: 5px;
       }
       .popupBackground{
           background-color:black;
           opacity: 0.20;
           filter: alpha(opacity = 20);
           position: absolute;
           width: 100%;           
           height: 100%;
           top: 0;
           left: 0;
           z-index: 9998;
       }
       a.actionlink:hover{
           text-decoration:underline;
       }
       .customactionLink {
            color: #015BA7;
            font-weight: normal;
            text-decoration: none;
        }
   </style>        
</apex:page>

Controller:
public class extQuoteselection {
  public Boolean isDisplayPopUp {get; set;}
    public extQuoteselection(ApexPages.StandardController controller) {
    isDisplayPopUp = true;
    }

}



 Thanks

Srinivas

All Answers

sfdcfoxsfdcfox
The answer is window.showModalDialog.

https://developer.mozilla.org/en-US/docs/Web/API/window.showModalDialog

http://msdn.microsoft.com/en-us/library/ie/ms536759(v=vs.85).aspx

Better option would be to implement a hovering DIV and keep the code in a single window, like how inline editing works today (try using enhanced list views to see how it works); showModalDialog is not uniform across all browsers, and has horrible side-effects. Despite being an ECMAScript feature, no browser seems to get it 100% right, and a custom popup dialog would be a better choice.
Sri549Sri549

Hi Staci

This may solve your requirement...

 

<apex:page standardController="Opportunity" extensions="extQuoteselection">   
    <apex:form id="frm">        
      <apex:detail subject="{!Opportunity.Id}" relatedList="false" title="false"/> 
        <apex:outputPanel id="tstpopup" rendered="{!IF(isDisplayPopUp ==true,true,false)}" >  
            <apex:outputPanel styleClass="popupBackground" layout="block" />
            <apex:outputPanel styleClass="custPopup" layout="block">                 
                    <apex:pageMessages ></apex:pageMessages>
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td >
                                <apex:outputLabel style="font-weight:bold;" value="Select Quote Properties: "></apex:outputLabel>
                            </td>                                                       
                        </tr>
                    </table>     
                    <br/>                              
            </apex:outputPanel>                        
        </apex:outputPanel>
    </apex:form>
    <style type="text/css">
        .errorMsg{
            width:159px;
        }
       .custPopup{
           background-color: white;
           border-width: 3px;
           border-style: solid;
           z-index: 9999;
           left: 50%;
           padding:10px;
           position: absolute;           
           width: 340px;
           //margin-left: -80px;
           top:100px;
           margin-left: -170px;
           //top:305px;           
          border-radius: 5px;
       }
       .popupBackground{
           background-color:black;
           opacity: 0.20;
           filter: alpha(opacity = 20);
           position: absolute;
           width: 100%;           
           height: 100%;
           top: 0;
           left: 0;
           z-index: 9998;
       }
       a.actionlink:hover{
           text-decoration:underline;
       }
       .customactionLink {
            color: #015BA7;
            font-weight: normal;
            text-decoration: none;
        }
   </style>        
</apex:page>

Controller:
public class extQuoteselection {
  public Boolean isDisplayPopUp {get; set;}
    public extQuoteselection(ApexPages.StandardController controller) {
    isDisplayPopUp = true;
    }

}



 Thanks

Srinivas

This was selected as the best answer