set all the iframes in the CSS {display:none;}
and skip the only one you want to be visible on page load
change the function to let it be much universal:
Code:
function HideFrameWorld(objID){
var fr = document.getElementById(objID);
if(fr.style.display=="none"){fr.style.display="block";}
else{fr.style.display="none";}
}
now you can show any iframe by it's id like HideFrameWorld('here_goes_the_id')
if you need only one iframe to be visible after this show/hide you need the other iframes to be hidden
Code:
// these are your iframes id's
var myiframes=['GoogleCal','Googlenews','Gallery','World,'Bucketlist','Shares'];
function HideFrameWorld(objID){
var fr = document.getElementById(objID);
if(fr.style.display=="none"){
fr.style.display="block";
// this hides the other iframes and skips the current
for(var i = 0; i < myiframes.length; i++){
if(myiframes[i]==objID){continue;}
else{document.getElementById(myiframes[i]).style.display='none';}
}
}
else{fr.style.display="none";}
}
Bookmarks