By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,688 Members | 1,715 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.

scroll bars

P: n/a
Hello,

I have a script that basically creates output in a frame in a browser.

However when the page gets longer I want to scroll them.

Of course I can add scroll bars to the frame and scroll that way, but I
want the "browser" to have the scrollbars if a page gets too long (or
too wide).

How in javascript can I "switch on" the "browsers scrollbars" ?

thanks,

Ron
Nov 21 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ron Croonenberg said the following on 11/20/2007 11:18 PM:
Hello,

I have a script that basically creates output in a frame in a browser.

However when the page gets longer I want to scroll them.

Of course I can add scroll bars to the frame and scroll that way, but I
want the "browser" to have the scrollbars if a page gets too long (or
too wide).

How in javascript can I "switch on" the "browsers scrollbars" ?
Don't use JS to do it, use CSS to do it.

overflow: auto;

If the frame needs a scrollbar, it gets added. If it doesn't, then it
doesn't.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 21 '07 #2

P: n/a
Hi Randy,

Yes I am using a bunch of css to begin with already.

I noticed that when you create a frame with "srolling=auto" that it
works better. I was just wondering if one can have some control over it.

thanks for your reply

Ron
Randy Webb wrote:
Ron Croonenberg said the following on 11/20/2007 11:18 PM:
>Hello,

I have a script that basically creates output in a frame in a browser.

However when the page gets longer I want to scroll them.

Of course I can add scroll bars to the frame and scroll that way, but I
want the "browser" to have the scrollbars if a page gets too long (or
too wide).

How in javascript can I "switch on" the "browsers scrollbars" ?

Don't use JS to do it, use CSS to do it.

overflow: auto;

If the frame needs a scrollbar, it gets added. If it doesn't, then it
doesn't.
Nov 21 '07 #3

P: n/a
Randy Webb wrote:
Ron Croonenberg said the following on 11/20/2007 11:18 PM:
>I have a script that basically creates output in a frame in a browser.

However when the page gets longer I want to scroll them.

Of course I can add scroll bars to the frame and scroll that way, but I
want the "browser" to have the scrollbars if a page gets too long (or
too wide).

How in javascript can I "switch on" the "browsers scrollbars" ?

Don't use JS to do it, use CSS to do it.

overflow: auto;

If the frame needs a scrollbar, it gets added. If it doesn't, then it
doesn't.
The `overflow' CSS property is not supposed to apply to those elements
unless they have fixed width or height.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Nov 23 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.