Results 1 to 3 of 3

Thread: how to disable iframe scrollbars in ie?

  1. #1
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how to disable iframe scrollbars in ie?

    Hello,

    I use javascript to create an iframe (see code below). I absolutely don't want any scrollbars to show. The below script manages this perfectly in firefox. However, in internet explorer I still get the scrollbars. Does anyone know a solution for this? It's been driving me crazy. Any help would be appreciated.

    code:

    ifrm = document.createElement("IFRAME");
    ifrm.src="calculator.htm";
    ifrm.style.width = 280+"px";
    ifrm.style.height = 180+"px";
    ifrm.style.border = "0px";
    ifrm.style.overflow="hidden";
    ifrm.className = "verborgen";
    document.body.appendChild(ifrm);

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Add the highlighted lines in your code and it will disable both scrollbars even in IE.

    Code:
    ifrm = document.createElement("IFRAME");
    ifrm.src="calculator.htm";
    ifrm.style.width = 280+"px";
    ifrm.style.height = 180+"px";
    ifrm.style.border = "0px";
    ifrm.style.overflow="hidden";
    ifrm.className = "verborgen";
    ifrm.scrolling = "no";
    ifrm.frameBorder = "0";
    document.body.appendChild(ifrm);

  3. #3
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hej, thanks a lot for your quick response. your solution works great!

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
  •