With a modal window and its overlay, no iframe shim should be required as, the select elements are not used while the overlay is visible. The selects can simply be rendered invisible.
Using jpayne04's existing code, we can do this:
Code:
<script type="text/javascript">
document.write('\n<!--[if lte IE 6]>\n\
<span id="ie_6_or_less" style="display:none;"><\/span>\n\
<![endif]-->\n');
var ftg;
function opentrailer(){
ftg=dhtmlmodal.open("movietrailer", "iframe", "mmedia/FTGtrailer.swf", "facing the giants", "width=381px,height=304px,center=1,resize=1,scrolling=0")
if(typeof ie_6_or_less !='undefined')
for (var i_tem = 0; i_tem < document.getElementsByTagName('select').length; i_tem++)
document.getElementsByTagName('select')[i_tem].style.visibility='hidden';
ftg.onclose=function(){ //Define custom code to run when window is closed
document.getElementsByTagName('iframe')[0].setAttribute('src', 'about:blank', 0);
if(typeof ie_6_or_less !='undefined')
for (var i_tem = 0; i_tem < document.getElementsByTagName('select').length; i_tem++)
document.getElementsByTagName('select')[i_tem].style.visibility='';
if(window.opera&&!ftg.cv){
ftg.cv=1
ftg=dhtmlmodal.open("movietrailer", "iframe", "about:blank", "Facing The Giants", "width=381px,height=304px,center=1,resize=1,scrolling=0")
dhtmlmodal.close(ftg);
setTimeout("ftg.cv=0", 1000);
}
return true;
}
}
//opentrailer()
</script>
Note: This only applies directly to jpayne04 as, the code used there was previously altered to ensure that the onclose function fires no matter how the modal window is closed.
Bookmarks