+ Start a Discussion
Greg HGreg H 

VF page Inside Home Page Component

I currently use a Home Page Component to display an sControl inside the salesforce sidebar. In my sControl I use a function to resize the IFRAME, which houses the sControl, after the sControl is loaded. In an effort to move away from using sControls, I have built a Visualforce page to replace my sControl but I get an error when I try to run the JavaScript function to resize the IFRAME. The error is "Permission denied to get property Window.document."
 
Can anyone tell me how to resolve this error or another way to resize the IFRAME in the sidebar where the Visualforce page is located? Or if there is another way to include a Visualforce page into the sidebar where the sidebar will resize correctly based on the content inside the Visualforce page
-greg
michaelforcemichaelforce

Greg... I believe it is happening because the visualforce pages are now hosted from a seperate domain "force.com" instead of "salesforce.com".  There are two threads I have commented on just now that discuss this:

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=9593

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=6489

mtbclimbermtbclimber

michaelforce is correct, the Visualforce page is served from another domain so there is no way to run your own script that tells the salesforce containing page to resize the iframe of your Visualforce page.

michaelforcemichaelforce

I added a similar component recently to a homepage... and a high percentage of users reported that their homepage would freeze during loading.  If they tried it a few times, it would eventually load... and once loaded they would never have any problems again.

 

Anyone have any idea why this would be?  Have you gotten similar complaints, Greg?

 

It is a simple HTML homepage component with only an iframe in it where the SRC is my visualforce page.  And the page itself is very simple with only a pageblock table to show some records.

 

It's one of those very elusive errors... very hard to reproduce.  Any ideas at all are appreciated.