I have tried different ways but I was unable to remove the scrollbars using javascipt. Any help is appreciated
Here is the code I was playing with...
info - adding a new iframe using JS with the attribute 'scrolling=no' removes scrollbars but does not work/remove scrollbars for an existing iframe
<html>
<script>
var count=1;
function removeScroll()
{
var testIframeObj=document.getElementById("testIframe");
var scrollStr=testIframeObj.scrolling;
alert("scrollStr="+scrollStr);
//testIframeObj.scrolling="no";
testIframeObj.scrolling="no";
testIframeObj.width="600";
testIframeObj.src="http://www.w3schools.com/html/default.asp";
//adding a new iframe with the attribute 'scrolling=no' works but does not work for an existing iframe
newIFrame = document.createElement("IFRAME");
newIFrame.width=300;
newIFrame.height=300;
newIFrame.scrolling="no";
newIFrame.id = "runtimeIframe"+count++;
newIFrame.src = "http://www.w3schools.com/";
document.body.appendChild(newIFrame);
//testIframeObj=newIFrame;
}
</script>
<style>
iframe
{
scrolling:no;
}
</style>
<body>
<p>An iframe where scrollbars are always shown:</p>
<iframe src ="http://www.w3schools.com/" width="200" height="200" scrolling="yes">
<p>Your browser does not support iframes.</p>
</iframe>
<p>An iframe where scrollbars are never shown:</p>
<iframe id="testIframe1" src ="http://www.w3schools.com/" width="200" height="200" scrolling="no">
<p>Your browser does not support iframes.</p>
</iframe>
<iframe id="testIframe" src ="http://www.w3schools.com/" width="200" height="200" >
<p>Your browser does not support iframes.</p>
</iframe>
<input type="button" value="remove scroll" onclick="removeScroll();"/>
</body>
</html>
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Monsanto; US; STL; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2)


