faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

82 of 115 people (71%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can I pop up IFRAME ?

Apr 26th, 2002 05:03
Neil Hardie, Igor Rabinovich,


(ie5+)
One method is to place you iFrame inside a DIV with CSS visibility set 
to 'hidden'.  When you want it to "pop up", set the DIV's visibility 
to 'visible'.
e.g. 
<div id="myDiv" style="visibility:hidden;">
   <iframe src="doc.html"></iframe>
</div>
<script>
function popup() {
  document.getElementById('myDiv').style.visibility='visible';
}
</script>