SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    document.body.style.overflow = "hidden"; - IE not working

    document.body.style.overflow = "hidden"; - This is not working for me in IE, Working absolutely fine in FF..
    On click i want to hide the scrollbar.

    I tried alternatives like
    document.getElementsByTagName("body")[0].style.overflow = "auto";
    window.document.body.scroll = 'no';
    but none of these work in IE, in firefox it disables the scrollbar as i needed but not in IE..is there any solution for this...

    thanks - vicky

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Try setting the style on the html element instead, that's the parent of the body element.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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