I'm using SimpleModal to displ开发者_开发技巧ay pop-up modal dialogs in my web app. The page in which I'm displaying the modals also has a Java applet that occupies much of the page. When the SimpleModal modals are displayed, they are layered below the applet.
Has anyone run into this before, and if so, how did you resolve?
Any advice is most appreciated. Thanks!
It may not be possible to solve your problem in the general case. What you're experiencing is commonly referred to as "burn through" and happens when an element makes itself visible even when a higher element should obscure it.
Other cases where this commonly occurs: older versions of IE and iframes (divs over the iframes are burned through), Flash movies (in most browsers).
A common technique for averting burn through is using what's called an iframe shim. A shim is an iframe which is sized to the higher content, but placed immediately below it, and above everything else. Plug-ins and iframes have a harder time burning through iframes than other elements.
Having said all that, I still think it's unlikely that the shim will prevent applet burn through. So one other approach would be to hide any applets at the time you launch the dialog, then restore them when the dialog closes.
You could either move the applet off-screen, change it's visibility, or display type. Expressed as CSS, these options are:
/* send off-screen */
position: absolute;
left: -1000em;
/* change visibility */
visibility: hidden;
/* change display */
display: none;
Good luck!
精彩评论