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

Can I change the height of a VF Page

I have an embedded VF page that links the user to an external website.


Only users in a specific profile can access this embedded site.


I have two pageblock sections on the VF Page.  Only one of them gets rendered. 


When the user should not see the embedded website I want to change the height of VF page so that I do not have excess white space.


When I add the VF Page to the page layout I set the height in pixels.  Can I change that height when the page is rendered?


Any help is appreciated.






Why don't you create 2 page layouts, one for each profile. And in the page layout that is related to your autorized profile you embed your VF and in the other not