faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

87 of 99 people (88%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

Can I change the z-index on existing layers via javascript on onmouseover, onmouseout and onclick?

Jun 28th, 2002 03:16
Gareth Hay, Pete Ruby,


Yes
obj = document.getElementById("existingLayerID");
if (typeof obj!="undefined")
{
 obj.style.zIndex=50;
}
or for the lazy
document.all.existingLayerID.style.zIndex=50;