I have a VF page that embeds a dashboard inside of an iframe. I'm not sure this is possible, but I am trying to use JQuery to hide a few elements in the dashboard page. So, I was trying this:
<apex:includeScript value="{!URLFOR($Resource.JQuery, '/js/jquery-1.11.0.min.js')}" />
<script type="text/javascript">
var j$ = jQuery.noConflict();
j$(document).ready(function() {
var f=j$("#iFrame");
f.load(function() {
f.contents().find(".viewHeaderValue").hide();
});
});
</script>
Initially, I didn't think this would be a cross domain scripting issue because the dashboard and the VF are within the same salesfore environment, but now, I'm wondering if cross domain scripting is the problem.
My VF page with the iframe has a domain of: https://c.na11.visual.force.com/apex/myVFpage
The domain of the dashboard which is in the same org that I'm embedding into the VF page has the following domain: https://na11.salesforce.com/
Is this a cross domain scripting issue?
Thanks.