Reputation: 12836
I am changing the properties of an iframe with javascript like so :
var iFrame = window.top.document.getElementById('window_content');
iFrame.setAttribute("height","63");
iFrame.setAttribute("scrolling","no");
iFrame.style.overflow="hidden";
iFrame.style.height = "63px";
It changes size as I would like but the scrollbar will not disappear. Is this possible? The html output looks like I would expect :
<iframe width="650" height="63" frameborder="0" scrolling="no" src="http://www.google.com/" id="window_content" name="window_content" style="overflow: hidden; height: 63px; width: 650px;"> </iframe>
Why is the scrolling attribute not recognized?
Upvotes: 1
Views: 1957
Reputation: 5999
try this:
iframe.style.overflowX = "hidden";
iframe.style.overflowY = "hidden";
Upvotes: 0
Reputation: 146302
It seems to be working perfectly fine for me:
http://jsfiddle.net/maniator/XSfzg/
This is in the latest Google Chrome.
Upvotes: 1