Solved

Transparent layer in Netscape

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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.
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 an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 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