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
TenaTena 

size inline visualforce page based on data

I have a visualforce page that I created and put at the top of the Account, Opportunity, etc.  It displays a message if there is one to show.  If not I would like it to not appear at all.  I don't see how to remove the visualforce page or resize it to nothing.  The only option that I can see is to use a different layout and I don't want to duplicate layouts for a message box.  Any suggestions? 

bob_buzzardbob_buzzard

You can't resize the iframe based on the data.  The embedded visualforce page comes from a different server to the standard page, and the standard page owns the iframe.  The browser won't let you change the contents of the standard page from the visualforce page as that would break the same origin policy.