zIndex value not getting set properly 
Author Message
 zIndex value not getting set properly

It would never work as presented:

Quote:
> alert(templay.style.zIndex);

It has to be:

alert(templay.style.z-Index);

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (14K) http://www.*-*-*.com/

Quote:

> I am experiencing a problem that when I am trying to access  zIndex
> value dynamically through object model I alway get a zero. Here is
> an example:
> ------------------------------------------------------------------------
> <DIV ID="LayoutLYR"><LAYER ID="LayoutLYR" TOP=0 LEFT=0
> VISIBILITY=INHERIT WIDTH=1418 HEIGHT=1613 Z-INDEX=1><DIV
> ID="Table2LYR"><LAYER ID="Table2LYR" VISIBILITY=INHERIT TOP=59 LEFT=150
> WIDTH=1206 HEIGHT=1455 Z-INDEX=1>

> if then inside javascript I try:
> alldivs= document.all.tags("DIV");
> for (i=0; i<alldivs.length; i++)
> {
>   templay= alldivs(i);
>   alert(templay.style.zIndex);
> }
> I alway get 0 for zIndex, other values in the de{*filter*} look correct.
> Any clues?
> Thanks,

> Igor

> Sent via Deja.com http://www.*-*-*.com/
> Share what you know. Learn what you don't.



Fri, 04 Jan 2002 03:00:00 GMT  
 zIndex value not getting set properly

Igor's syntax is mostly correct...  

http://www.*-*-*.com/

As a property of an element.style object, it's spelled zIndex, as a CSS attribute it's z-index.  

The problem is that there is no explicit Z-INDEZ HTML attribute, you have to set it via a stylesheet, an inline STYLE attribute of the DIV element, or via code using the elementid.style.zIndex property...

<DIV ... STYLE='z-index: 1;' ...>blahblah</DIV>
--
Michael Harris


It would never work as presented:

Quote:
> alert(templay.style.zIndex);

It has to be:

alert(templay.style.z-Index);

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (14K) http://www.*-*-*.com/

Quote:

> I am experiencing a problem that when I am trying to access  zIndex
> value dynamically through object model I alway get a zero. Here is
> an example:
> ------------------------------------------------------------------------
> <DIV ID="LayoutLYR"><LAYER ID="LayoutLYR" TOP=0 LEFT=0
> VISIBILITY=INHERIT WIDTH=1418 HEIGHT=1613 Z-INDEX=1><DIV
> ID="Table2LYR"><LAYER ID="Table2LYR" VISIBILITY=INHERIT TOP=59 LEFT=150
> WIDTH=1206 HEIGHT=1455 Z-INDEX=1>

> if then inside javascript I try:
> alldivs= document.all.tags("DIV");
> for (i=0; i<alldivs.length; i++)
> {
>   templay= alldivs(i);
>   alert(templay.style.zIndex);
> }
> I alway get 0 for zIndex, other values in the de{*filter*} look correct.
> Any clues?
> Thanks,

> Igor

> Sent via Deja.com http://www.*-*-*.com/
> Share what you know. Learn what you don't.



Fri, 04 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. zIndex value not getting set properly

2. Getting full list of Domain Users is not working properly - some users missing

3. Cookie not getting read properly...why?

4. Getting full list of Domain Users is not working properly - some users missing

5. Running Excel within IE6 / getting Solver to work properly

6. Setting up InterDev + IE5.0 properly with both LAN and DUN

7. How to properly set up a postscript printer under SVR4

8. OnClick event not working properly

9. gs/gsview not clipping properly??

10. my pdf will not open properly

11. Javascript does not work properly in IE5

12. appendChild object not working properly across frames

 

 
Powered by phpBB® Forum Software