473,804 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document.getEle mentById(name). style.z-index

How do I change the z-index on a page I have tried

document.getEle mentById(name). style.z-index
and
document.getEle mentById(name). style.Zindex

I want to change the z-index to show a layer that is covered
--

Totus possum, totum Deum.
Totus ero, totum meum.
WSW
Oct 6 '06 #1
3 46360
Aquosus wrote on 06 okt 2006 in comp.lang.javas cript:
How do I change the z-index on a page I have tried

document.getEle mentById(name). style.z-index
No
document.getEle mentById(name). style.Zindex
No, the - is always replaced
by a uppercasing the letter that follows:

style.zIndex

instead of the name use the id

document.getEle mentById('myId' ).style.zIndex = -5
I want to change the z-index to show a layer that is covered
Forget about layers, speak <div>s

Read the specs:

<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/zindex.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 6 '06 #2
Not only that, you also want to make sure you understand the rules for
z-indexing... for example...

<div id="d11">
<div id="d121"></div>
<div id="d122"></div>
<div id="d123"></div>
<div id="d124"></div>
</div>
<div id="d12">
<div id="d221"></div>
<div id="d222"></div>
<div id="d223"></div>
<div id="d224"></div>
</div>

You can play with the zIndexes of the d2** blocks with each other but
you aren't going to have d224 on top on d11. z-indexing is for
sibblings only.

Evertjan. wrote:
Aquosus wrote on 06 okt 2006 in comp.lang.javas cript:
How do I change the z-index on a page I have tried

document.getEle mentById(name). style.z-index

No
document.getEle mentById(name). style.Zindex

No, the - is always replaced
by a uppercasing the letter that follows:

style.zIndex

instead of the name use the id

document.getEle mentById('myId' ).style.zIndex = -5
I want to change the z-index to show a layer that is covered

Forget about layers, speak <div>s

Read the specs:

<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/properties/zindex.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 7 '06 #3
wrote on 07 okt 2006 in comp.lang.javas cript:
Not only that, you also want to make sure you understand the rules for
z-indexing... for example...
True,
you might want to look into the merits of not topposting too,
especially in a non topposting thread.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
3251
by: lawrence | last post by:
Sorry for the dumb question but I'm new to Javascript. I wrote this script hoping to animate some div blocks on a page. You can see the page here: http://www.keymedia.biz/demo.htm Can anyone tell me why these DIVs don't drift to the left as they are supposed to? <script language="javascript">
12
3946
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with both single quotes and no single quotes, but it doesn't work either way. What am I doing wrong? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) { document.getElementById('weblogs').style.visibility='hidden';
4
5486
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) { document.getElementById(nameOfDiv).style.visibility='visible'; document.getElementById(nameOfDiv).style.height='auto'; if (nameOfDiv != 'weblogs')
4
26601
by: Ghyslaine Crespe | last post by:
Hello, In my script, the line document.getElementById(id).style.background-position = "-200px -500px"; fails ! So, how can I change the background-position value ?
6
7507
by: Michi | last post by:
Hallo, of course, this doesn't work: document.getElementById('ID').style.-moz-user-select = 'text'; - but i hope it shows my problem... Is it possible to set this css option by javascript and how? Is there any workaround for that? I'd need this to temporarily avoid text selection.
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.