06-10-2009, 08:42 PM
I am having problems displaying DHTML content (spiffycalendar freeware) that overlaps an IFRAME which contains XML content. I have attached a zipfile with the necessary files to illustrate the problem. I am using IE7 and Apache Tomcat 6.0 and the parent.html page needs to be displayed by way of an HTTP request. Loading the html file into the brower directly does not setup the problem correctly.

1) parent.html contains the calendar widget and an IFRAME
2) iframe.html contains a simple XML document
3) Calendar widget: spiffyCal.js and spiffyCal.css (you can download from http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_48.html)

if you don't want to install the calendar widget then any dhtml div should do the same.

when the calendar is displayed it gets hidden behind the IFRAME in the areas that overlap. If you change the IFRAME content from an XML to an HTML source then the overlapping problem goes away.

Can anyone tell me how to avoid this problem without having to resort to rendering the XML to HTML before displaying it in the IFRAME.


06-11-2009, 06:05 PM

09-11-2009, 07:57 PM
I encountered a more complex version of this in the main framework that my company develops, but I haven't really been able to find more information about it on the internet.

It seems that in IE (even IE7 and IE8), iframes with XML-based content (delivered with content-type="text/xml", could be either an unformatted XML document or an XML document transformed into HTML with <?xml-stylesheet?>) are windowed elements. Just like SELECT elements in IE6, they will be rendered on top of other non-windowed elements. This doesn't happen in IE7 with HTML-based iframes, so I don't know why, but it seems XML-based iframes are a fundamentally different type of element in IE.

The workaround for your case is the same as the workaround for popups in IE6 - create an iframe "shim" for your calendar, position it to be the same size as the calendar, and give it a z-index one smaller than the calendar's.

09-17-2009, 09:52 AM
Thanks for the suggestion, I wish it had worked.
website update (http://****************/)