By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,688 Members | 1,770 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,688 IT Pros & Developers. It's quick & easy.

scrollbar to iframe through javascript.

P: n/a
hi all,

can any one tell me how will i set scrollbar to iframe throguh
javascript.
please help me asap.
thanks in advance
Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Apr 23, 5:03*am, Archana <trialproduct2...@yahoo.comwrote:
hi all,

can any one tell me how will i set scrollbar to iframe throguh
javascript.

please help me asap.

thanks in advance
1) Goto: google.com

2) Search: iframe scrollbars

3) Press Button: I'm feeling lucky

4) Profit!

-Tom Woz :)
Jun 27 '08 #2

P: n/a
On Apr 23, 10:49*pm, tomtom.wozn...@gmail.com wrote:
On Apr 23, 5:03*am, Archana <trialproduct2...@yahoo.comwrote:
hi all,
can any one tell me how will i set scrollbar to iframe throguh
javascript.
please help me asap.
thanks in advance

1) Goto: google.com

2) Search: iframe scrollbars

3) Press Button: I'm feeling lucky

4) Profit!

-Tom Woz :)
hi,
thanks for reply
i think you are not getting what i want.

I want to enable/disbale scrollbar through javascript and not through
its style at runtime.

if you have any idea abt it then please help me asap

thanks in advance
Jun 27 '08 #3

P: n/a
Archana wrote:
>>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').innerHT ML =
'<iframe scrolling=yes></iframe>';">
<input type="button" value="Disable scrollbars"
onClick="document.getElementById('ifrdiv').innerHT ML =
'<iframe scrolling=no></iframe>';">

Hope this helps,

--
Bart
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.