zIndex problem... 
Author Message
 zIndex problem...

This doesnt want to work in IE (it works perfectly in other)
IE doesnt do anything if the event onClick happens? is that a bug?
<html>
<head>
<script language="JavaScript" type="text/javascript">
id = new Array();
id[0] = "la";
id[1] = "al";
function focus (i) {

for (y = 0; y < id.length; y++)
document.getElementById(id[y]).style.zIndex = "0";
document.getElementById(id[i]).style.zIndex = "1";

Quote:
}

</script>
</head>
<body id="body" onMouseUp="mouse_up()">
<div id="la" style="width:300px;height:400px;border:2px solid
blue;padding:0px;position:absolute;top:100px;left:100px;background:white;" onClick="focus(0)">
Layer1
</div>
<div id="al" style="width:300px;height:400px;border:2px solid
blue;padding:0px;position:absolute;top:50px;left:50px;background:white;" onClick="focus(1)">
Layer2
</div>
</body>
</html>


Tue, 08 Jun 2004 20:13:24 GMT  
 zIndex problem...
Don't call your function focus, it clashes with a DOM event name. Funny that
this should work in NN6 and not in IE. I usually run into trouble using
names like that in NN where IE works with them.

--
A life spent making mistakes is not only more honorable but more useful than
a life spent doing nothing. -George Bernard Shaw

=-=-=
Steve
-=-=-



Quote:
> This doesnt want to work in IE (it works perfectly in other)
> IE doesnt do anything if the event onClick happens? is that a bug?
> <html>
> <head>
> <script language="JavaScript" type="text/javascript">
> id = new Array();
> id[0] = "la";
> id[1] = "al";
> function focus (i) {

> for (y = 0; y < id.length; y++)
> document.getElementById(id[y]).style.zIndex = "0";
> document.getElementById(id[i]).style.zIndex = "1";
> }
> </script>
> </head>
> <body id="body" onMouseUp="mouse_up()">
> <div id="la" style="width:300px;height:400px;border:2px solid
> blue;padding:0px;position:absolute;top:100px;left:100px;background:white;"
onClick="focus(0)">
> Layer1
> </div>
> <div id="al" style="width:300px;height:400px;border:2px solid
> blue;padding:0px;position:absolute;top:50px;left:50px;background:white;"
onClick="focus(1)">
> Layer2
> </div>
> </body>
> </html>



Tue, 08 Jun 2004 21:18:11 GMT  
 zIndex problem...
Use a different name for your focus() function,
such as

function myFocus(i){...}

// instead of your

function focus(i){...}

focus() is a pre-existing method in dhtml.

regards,
Meenal

Quote:
>-----Original Message-----
>This doesnt want to work in IE (it works perfectly in
other)
>IE doesnt do anything if the event onClick happens? is
that a bug?
><html>
><head>
><script language="JavaScript" type="text/javascript">
>id = new Array();
>id[0] = "la";
>id[1] = "al";
>function focus (i) {

>for (y = 0; y < id.length; y++)
>document.getElementById(id[y]).style.zIndex = "0";
>document.getElementById(id[i]).style.zIndex = "1";
>}
></script>
></head>
><body id="body" onMouseUp="mouse_up()">
><div id="la" style="width:300px;height:400px;border:2px
solid
>blue;padding:0px;position:absolute;top:100px;left:100px;ba

ckground:white;" onClick="focus(0)">
Quote:
>Layer1
></div>
><div id="al" style="width:300px;height:400px;border:2px
solid
>blue;padding:0px;position:absolute;top:50px;left:50px;back

ground:white;" onClick="focus(1)">

- Show quoted text -

Quote:
>Layer2
></div>
></body>
></html>

>.



Tue, 08 Jun 2004 21:33:01 GMT  
 zIndex problem...
Thank you very much!


Tue, 08 Jun 2004 22:21:24 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. zIndex, Area Maps & HotSpots

2. zIndex & AREA map

3. zindex?

4. changing zIndex for <DIV>

5. zIndex value not getting set properly

6. zIndex value not getting set properly

7. problem: printing ps file and ps to text problem

8. window.open problem / windows problem

9. GS 5.01 INSTALLATION PROBLEMS ON LINUX--JPEG/MAKE PROBLEM

10. window.open problem / windows problem

11. Script engine problem - script problem.jpg (1/1)

12. Script engine problem - script problem.jpg (0/1)

 

 
Powered by phpBB® Forum Software