HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 13th, 2000, 03:23 PM
CS CS is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 44 CS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I am working with DIV layers (shudder)

I have 4 images that you can click on...

Each one opens up a new layer just fine. And by clicking on the image again it will close the layer just fine.

The problem I have is that when you do open the layer, then open another layer without closing the first one... one of the layers will over ride the other one.

(OK, this is hard to explain so bear with me)

I click on the image to open layer 1.
I close layer 1.
I then click on the image to open layer 2.
I click on the layer 1 image again, and can see nothing since I haven't closed layer 2 and layer 1 is under layer 2.


Is there a way to reorder the layers so that which ever layer I choose is always on top?

I'm not sure what I can do to fix this situation... but any ideas would be appreciated.


Reply With Quote
  #2  
Old September 13th, 2000, 08:54 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Pembroke Pines, Florida, USA
Posts: 2,300 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 3 h 12 m 27 sec
Reputation Power: 53
Sure, you just shuffle the z-index.

With DHTML layers, if the z-index is null, or they all have the same value, then the order of precedence is that each layer descending through the code of a document is higher than the one before it.

All you have to do is set the current layer's z-index to 1, while setting the others at 0, and the current layer(last clicked) will be on top.

document.all.layerid.zindex = 1; //Internet Explorer 4+

document.layerid.zIndex = 1; //Netscape 4+

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Event Handlers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT