Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Z-index w/ Event Handlers?

Status
Not open for further replies.

ID10T16

Technical User
Sep 22, 2000
160
US
I need to know if you can change the z-index of a <div> when an event handler is executed. Basically I just need to know if the z-index can be a variable, & if so, how can I implement this? Thanx for your help.
 
I don't know why you couldn't do this...


function ChangeZ(){
document.myDIV.style.z-index = 2;
}


??????

Hope this helps. I'm sure this would work.

If you need any help, I'll be folowing this thread.
 
document.all.myDIV.style.zIndex=10000 wuld be rite for ie4x & ie5x
document.getElementById(&quot;myDIV&quot;).style.zIndex=10000 for ie5x & nn6
document.layers.myDiv.zIndex=10000 for nn4x
regards, vic
 
Thanx gerrygerry, the code didn't work word for word, but it did point me in the right direction to experiment till I was succesful. I ended up learning that as vituz said, it has to be zIndex, & I also found out the compatibility stuff that vituz said. I haven't worked w/ website stuff in quite a while, so I'm having to relearn alot of stuff. The more I play, the more comes back to me, like in this case. Again, thank you both for your help. The current site I'm redesigning is I'm giving it a new design, & granted that I gain enough sense to understand it again, I'm going to implement ASP & database access. Hope yall will check it out here in a few weeks & give me some constructive critcism. The current site is not my work however, just for the record.
Daniel Leger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top