PDA

View Full Version : how to disable iframe scrollbars in ie?



-jesse-
09-24-2008, 10:39 AM
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);

codeexploiter
09-24-2008, 11:36 AM
Add the highlighted lines in your code and it will disable both scrollbars even in IE.



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);

-jesse-
09-24-2008, 11:53 AM
hej, thanks a lot for your quick response. your solution works great!