[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

Firefox Problem w/ Layer Visibility and Iframe

What I am trying to do is through javascript have a Flash Application that loads up outside webpages in iframes that are held in layers. This all works fine and good in IE, but dies a painful death in Firefox. I believe I am getting control of the positioning issue in Firefox (At first it was all popping up in the upper left corner), but can't seem to find/fix the issue of controlling the visibility. Basically the frames come up and disappear, can't control the scroll bar on the iframe (i assume due to the layering/visibility issues), and it "blacks out" the area where it should be when it isn't visible on top of the Flash App that is running on the bottom of the layering.

I hope that makes some amount of sense.

The code for the layers is pretty straightforward:

<div id="WorldLayer" style="position:absolute; left:85px; top:145px; width:700px; height:390px; z-index:2; visibility: hidden;">
<iframe src="" name="WorldFrame" id="WorldFrame" width="700px" marginwidth="0px" height="390px" marginheight="0px" scrolling="yes"></iframe>

The javascript for bringing it up is:

function GoCamera() {
window.document.getElementById("WorldLayer").style.left = "85px";
window.document.getElementById("WorldLayer").style.top = "145px";
window.document.getElementById("WorldFrame").src = "address";
window.document.getElementById("WorldLayer").style.visibility = "visible";

Basically just trying to get this up and working in Firefox as quickly as possible. Any help is much appreciated.
  • 2
  • 2
1 Solution

Maybe you can try to use

window.document.getElementById("WorldLayer").style.visibility = "inline";

By the way, is the problem just concerning being unable to show back the hidden layer?

AlexSilvermanAuthor Commented:
in firefox it seems to lack control over the visibility. so when it is supposed to be visible it is all sorts of screwed up, and it never really goes away completely from the screen when it is supposed to be there.

a flash app is running in the bottom layer, which uses javascript to reveal the layers and tell what the source for the iframe is.

This has come up a few times. It seems that in all browsers besides IE, Flash is rather like a form control; that is to say, it doesn't like having other elements layered over it and will tend to show through, or at least ruin the rendering of what's on top.

You might want to try placing an element (like a DIV) around the Flash content so you can apply CSS invisibility to it when the other layer is over it.
AlexSilvermanAuthor Commented:
can't make the flash invisible... the iframe is "inside" the flash app...
Then I'm afraid it's not gonna happen, unless you were to break apart the Flash into separate 'frame' sections and a center section (the bit that gets covered by the iframe). So if the whole Flash area surrounds the iframe on all sides, that's a minimum of 5 separate movies. If they don't need to interoperate with each other, I guess it might be worthwhile, but it's still a lot of work!

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now