Solved

Transparent layer in Netscape

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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 …
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

743 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

13 Experts available now in Live!

Get 1:1 Help Now