You need to sign in to do that
Don't have an account?
Show report in home page html iframe and scroll it
Hi all,
I would like to show, in the home page, a Salesforce custom report, the list of tasks and the calendar. From the report I want to show only its chart or if that's not possible, only the details of the report, that is not displaying the Salesforce header nor the filters section.
To achieve this, I have created a HTML component with an iframe and some javascript code lines. The iframe src attribute is the custom report id. This, obviously, works fine. The problem comes when I try to get the iframe window and scroll it right to the chart position.
The Home Page component content is:
<iframe id="reportVN" src="/00OS0000000d8yQ" width="100%" scrolling="no" frameborder="0" height="350"></iframe><script type="text/javascript"> var marco = parent.document.getElementById("reportVN"); marco.contentWindow.scrollTo(0, 1000);</script>
This code does nothing at all.
If I put an alert to see if I can access the iframe by its ID, I get the iframe properly. I tried to change its visibility to see if I was able to change the iframe attributes, and it worked.
So I put the scrollTo() function (the last line in the code sample) inside an alert and all I got was an "undefined" message.
Any ideas on this issue??
Thanks,
Susana
Thanks werewolf, that's exactly what I'm trying but I'm getting lost in all that code and elements from Salesforce :smileysad:
I'm sure I will have this solved soon ^^
The debugger keyword is your friend. Inside your Javascript code, put the following line:
debugger;
And firebug will break right there. Don't forget to take it out when you're done.