Hi - first post so be kind!
I have a function that shows/hides an iframe. I actually found the function on this site. Here is the structure:
Mainpage:
Has a link which opens a floating iframe.
Code:
<a href="#" onclick="HideFrameComingSoon()">Click Here</a>
<iframe id="comingsoon" allowtransparency="true" style="display:none;" scrolling="no" src="comingsoon/soon1a.php"></iframe>
<script language="javascript">
<!--
function HideFrameComingSoon() {
var fr = document.getElementById ("comingsoon");
if(fr.style.display=="none") {
fr.style.display="block";
}
else {
fr.style.display="none";
}
}
-->
</script>
iframe :
Code:
<a href="" onClick="parent.HideFrameComingSoon()">Close</a>
This is working great - except when you've opened/hidden the iframe in IE7 and then click to re-open the iframe on the main page you get a 404. Works perfectly in Firefox.
I think it has something to do with the fact that the iframe loads a page within the /comingsoon directory and therefore IE get's confused, but I can't be sure?
Any ideas?