Hey world! I'm REALLY new to javascript and i wanted to make a simple script that shows or hides an Iframe. Here's an example of what i think would work but doesn't:
Can someone please tell me what's wrong???Code:<a href="javascript:showHide()">Show or Hide Frame</a> <iframe src="http://www.google.com" name="google" id="google" style="visibility:visible"></iframe> <script type="text/javascript"> function showHide(){ if (document.getElementById("google").style.visibility == "visible"){ document.getElementById("google").style.visibility == "hidden"; } else if (document.getElementById("google").style.visibility == "hidden"){ document.getElementById("google").style.visibility == "visible"; } } </script>


Reply With Quote
Bookmarks