Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problems using z-index in javascript

    Hi all,

    got this code and get a syntax error on this line....
    Code:
    parent.document.getElementById('divviewer').style.height = "36px"
    parent.document.getElementById('divviewer').style.z-index = "1"; 
    // set browser to default pos and show
    parent.document.getElementById('divbrowser').style.top = "36px";
    parent.document.getElementById('divbrowser').style.height = "95%";
    parent.document.getElementByID('divbrowser').style.z-index = "2"; 
    parent.document.getElementById('divbrowser').style.visibility = "visible";
    Its the z-index style
    I have tried zindex, z-index, style.z-index, style.zindex and none of them work. Any ideas? Thanks

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    168
    Thanks
    0
    Thanked 5 Times in 5 Posts
    It should be .....style.zIndex

  • #3
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's: zIndex

    Javascript follows camelCase convention and all style declarations with a hyphen have the hyphen removed and the first letter of the second word upperCase with no spaces in between words...

    .....Willy

    BTW: Although not a style declaration...
    ismap when used in javascript is: isMap
    (this one thru me for a loop until I searched the docs)
    Last edited by Willy Duitt; 12-06-2004 at 08:23 PM.

  • #4
    New to the CF scene
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks!!!!

  • #5
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,746
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there Willy,
    BTW: Although not a style declaration...
    ismap when used in javascript is: isMap
    (this one thru me for a loop until I searched the docs)
    ...and usemap becomes useMap

    coot

  • #6
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Heh Coothead
    Happy Holidays to you and yours

    Yeah, you are right about useMap
    There's a few more single word entities that I forget ATM....

    Cheers;
    .....Willy

  • #7
    New Coder
    Join Date
    Jun 2009
    Posts
    20
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I tried that and it isnt working for me, not on IE or Firefox.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •