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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getting scrollbar width on IE5 for Mac

    Hi, I really, really need to find a way to get the width in pixels of the vertical scrollbar in an HTML document. The problem is document.body.offsetWidth returns the same value as document.body.clientWidth on Mac's IE5 and thus I cannot substract one from the other and get the width of the scrollbar. I won't go into details about what I'm trying to accomplish with this cause its complicated but just believe me when I tell you getting the scrollbar's width is the only way to solve my problem... Please, does anyone know a different way to this? (it doesn't even have to be Javascript: vbscript, asp, whatever as long as it works on mac explorer ) thanks in advance..

  • #2
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok, i've figured it out, but there's still one problem... Here's my theory:
    I disable scrolling momentarilly inside the frame (i'm using frames btw) and use document.body.offsetWidth to measure the width of the page without scrollbars (since there are none by now). Then, I enable the scrollbars again and measure the width of the page with the scrollbar using document.body.offsetWidth. Then I substract one from the other and thats it!!
    The problem is.. how do I disable the scrollbars in the frame? any ideas?


  •  

    Posting Permissions

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