scroll bars

R

Ron Croonenberg

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
 
R

Ron Croonenberg

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
 
W

Will

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.
[/QUOTE]


Thanks for the suggestion. I also try to put my CSS in an external file so I can
make updates on one location.

Will
 
R

Ron Croonenberg

Is there a difference between explorer and mozilla with the frame
scrollbars ?

The 'overflow: auto;' seems to work just fine in firefox but not in ms
explorer ?

What happens is that when I set overflow/scrolling before I update the
frame it updates in a somewhat 'chunky' non-smooth way. if I set
scrolling to "auto" after the frame is updated it looks a lot better. In
mozilla firefox the frame scroll bars show up when I do a:

var frameObj = parent.document.getElementById(framenumber);
..
...updating frame here..
..
frameObj.style.overflow = 'auto';

So how do I do the same thing in explorer (and possibly other browsers)
as I do in mozilla ?

thanks,

Ron
 
T

Thomas 'PointedEars' Lahn

Randy said:
Ron Croonenberg said the following on 11/20/2007 11:18 PM:

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
 
T

Thomas 'PointedEars' Lahn

Ron said:
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.

You should be able to perform write access to the `scrolling' property of
the corresponding frame object:

parent.frames["..."].scrolling = "...";

However, IE (7) does not seem to like that either, and frankly I don't see
the purpose in this. Either there is enough content in the frame to allow
scrolling or there is not.
thanks for your reply

You're welcome. Thanks in advance for proper quoting next time.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top