+ Start a Discussion

customise pop-up window

hi guys,

how do you customise the pop-up window made by commandLink target="_blank"? like resizing the window for example.

as now the popup window will appear in a new tab.

i know we can do it using window.open javascript, but can we do it without using javascript?

can anyone help me?



Best Answer chosen by Admin (Salesforce Developers) 

You can do this with a little JavaScript in the onclick attribute of the commandLink:



<apex:commandLink value="Do It" onclick="window.open('about:blank','mypopup','location=1,status=1,scrollbars=1,width=100,height=100'); " target="mypopup"/>



For more on what parameters window.open supports, see: