Archana said:
can any one tell me how will i set scrollbar to iframe throguh
javascript.
[...]
I want to enable/disbale scrollbar through javascript and not through
its style at runtime.
Only Firefox knows the dynamic 'scrolling'-property for (i-)frames:
<iframe id="ifr"></iframe>
<input type="button" value="Enable scrollbars"
onClick="document.getElementById('ifr').scrolling = 'yes';">
<input type="button" value="Disable scrollbars"
onClick="document.getElementById('ifr').scrolling = 'no'; ">
But with a bit of creativity (requires a reload of the iframe):
<div id="ifrdiv">
<iframe></iframe>
</div>
<input type="button" value="Enable scrollbars"
onClick="document.getElementById('ifrdiv').innerHTML =
'<iframe scrolling=yes></iframe>';">
<input type="button" value="Disable scrollbars"
onClick="document.getElementById('ifrdiv').innerHTML =
'<iframe scrolling=no></iframe>';">
Hope this helps,