+ Start a Discussion
Chris987654321Chris987654321 

Size of a VF Window

If I have a VF page that is being called from a <apex:commandlink> is there a way to control the size of the page that is being called. I wanted the VF page to open in a new window which I believe I can do with the target="_blank" attribute of commandlink.

 

Once it is opened in a new window how can I control the width and height of that new window?  

bob_buzzardbob_buzzard

If you are redirecting to particular page (i.e. you know the page URL withouth going back to the controller), you can use  something like:

 

 newWin=window.open(url, 'Popup','height=400,width=500,left=100,top=100,scrollbars=yes,toolbar=no,status=no');


 

If not, you will need an onload javascript function that does something like:

 

window.resizeTo(500,500) 

Semira@gmail.comSemira@gmail.com
@bob_buzzard Hi Bob, I know it's 4 years old post but quick questions. Is there way to disable window resizable? I put in resizable = false. it still doesn't work. I'm using it in command button.