Solved

Transparent layer in Netscape

Posted on 2000-03-01
5
192 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now