Solved

Transparent layer in Netscape

Posted on 2000-03-01
5
197 Views
Last Modified: 2011-09-20
I am displaying a layer on top of another, but when it's displayed, I do not want to allow the user to click anything else but the layer that currently sits on the top. I thought of using a "transparent" layer to put underneath it... It worked in IE, but not in Netscape.  I need it to work in both.  

NOTE: xBrowser is an object that does all the cross-browser functionality...

Thanks and here's the code snippet:

<html>
<style><!--
      .nu {text-decoration: none;}
      A:link {text-decoration: none; color: white}
      A:visited {text-decoration: none; color: white}
      A:hover {text-decoration: none; color: blue}
#LayerInvisible {position:absolute; left: 1px; top: 41px; width: 787px; height: 553px; z-index:97;}
#LayerFinancing {position:absolute; width:374px; height:405px; z-index:98; left:150px; top:136px;}
--></style>

<script language="JavaScript">
function showWindow(aLayer)
{
      invisible.visibility = xBrowser.showObject(invisible);
      aLayer.visibility = xBrowser.showObject(aLayer);
      opportunityProbability.visibility = xBrowser.hideObject(opportunityProbability);
}
</script>

<body>
<div id="LayerInvisible"></div>
<div id="LayerFinancing"><img src="wwwroot/graphics/Sales/Financing.GIF">
<div id="LayerOpportunityMenuFinancing"><a href="#" onClick="javascript:showWindow(financing);"</a></div>
</body>
</html>


0
Comment
Question by:zemag
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:Hardaway
ID: 2575012
Actually, I am not very sure what's the usage of the invisible layer. But have you tried to adjust the z-index so that the invisible layer's z-index is larger than the visible one?
0
 

Author Comment

by:zemag
ID: 2576873
Yes I have tried moving the z-index values around but, like i said, it still does not work in Netscape and IE it's fine.  The objective of this layer is to prevent users from clicking anywhere else on the screen except the currently displayed top layer. Let's say that you click on a button and that causes a smaller window to appear (to change values, etc.) you want that window to be "modal" i.e. user can't click anywhere else until they click on OK/cancel.

Hope this calrifies things and thanks.  
0
 

Expert Comment

by:robjgreen
ID: 2619696
Have you thought of using a JavaScript event handler instead?
0
 

Author Comment

by:zemag
ID: 2620808
What?
0
 
LVL 2

Accepted Solution

by:
lilian_kelly earned 100 total points
ID: 2800276
You can achieve this by using the moveAbove() and moveBelow()functions that are available for the layer object.
e.g
document.LayerInvisible.moveAbove(document.LayerOpportunityMenuFinancing);



0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question