?
Solved

Transparent layer in Netscape

Posted on 2000-03-01
5
Medium Priority
?
200 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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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 …
Suggested Courses

862 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