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

How to generate a visual force page as popup window when we click on custom button



I am doing one VF Page.In this one custom button is there.If I click on this button  it should open another visualforce page as popup window.

How can I acheive this.Can anyone please suggest me...


Thanks in Advance,




u can get this by using html...try this once



        <a href="javascript&colon;void(0);" onclick="return popitup('../apex/yourVFpage')"  class="btn"></a>



You can also try using


<a href="#" onclick="'.../apex/yourVFpage','_blank')"/>

N.V.V.L.Vinay KumarN.V.V.L.Vinay Kumar


<apex:commandButton onclick="javascript&colon;openPopUpWindow;return false"/>



<script type="text/javascript">

function openPopUpWindow(){      '/apex/pagename','','width=900,height=600');






If this works don't forget to mark as solution

Hi Vinay,
i tried ur example but it is not working yar,,,,,,,,,,,,,,,,,,,,please provide any other example to display vf page as popup in vf page
N.V.V.L.Vinay KumarN.V.V.L.Vinay Kumar

Can you please give the code.