If you have control of the IFRAME's contents, then add a parameter to your frame's url tag, such as
/myiframesite?hidedivs=true
Then, in the web page within the iframe, read the url parameter, and make the page behave as you direct.
If you don't have control, good luck.
How to do the above
You can easily find how to read url parameters by googling just that. A quick search found this page.
From reading that post, you can copy out this example code:
function getQueryParam( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null ) return "";
else return results[1];
}
Then you could use it like:
var doHideDivs = getQueryParam('hidedivs');
Then, if doHideDivs is true, hide your divs
.
If you are stumped on hiding your divs, then you should do a basic Javascript tutorial before getting so ambitious on such an exact task as this.