+ Start a Discussion
sonatinesonatine 

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?

 

thanks.

Best Answer chosen by Admin (Salesforce Developers) 
stephanstephan

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:

 

http://www.w3schools.com/jsref/met_win_open.asp

 

...stephan