You need to sign in to do that
Don't have an account?
Patrick C Mayer 91
Popup window problem VF
I made some updates to fix other errors and this code stopped working properly. When it calls openPopup() from the commandButton it works normally, but when it is automatically called from the actionStatus I am getting nothing. I have checked my pop-up setting in the browser. Not realy sure what happened.
<apex:page controller="IdleCasePopUp"> <apex:form > <apex:pageBlock id="myPageId"> <apex:actionPoller reRender="myPageId" interval="10" status="renderMeStatus"/> <apex:actionStatus id="renderMeStatus" onstop="openPopup()"/> <apex:commandButton title="Test" value="Show Queue" onclick="openPopup()"/> <apex:outputText value="{!dP}"/> <script id="script"> var newWin=null; function openPopup() { var url="/apex/autoOpen"; if ({!dP}) { newWin=window.open(url, 'Popup','height=500,width=600,left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no'); IdleCasePopUp.closePopup(); } if (window.focus) { newWin.focus(); } } function closeLookupPopup() { if (null!=newWin) { newWin.close(); } } </script> </apex:pageBlock> </apex:form> </apex:page>
<apex:actionPoller reRender="myPageId" interval="10" status="renderMeStatus"/>
<apex:actionStatus id="renderMeStatus" onstop="openPopup()"/>
<apex:commandButton title="Test" value="Show Queue" onclick="openPopup()"/>
<apex:outputText value="{!dP}"/>
reference:http://www.laceysnr.com/2011/05/apexactionstatus-making-it-work.html