...

View Full Version : Scrolling a frame



ellisd5
09-04-2007, 02:11 PM
Hello all, I have a bit of a problem with scrolling and not sure what's possible.

I have a frameset which has a pane of the right containing a list of queues. I really don't want to have the scrollbars on because I really do need that little bit of extra space it gives me not having them on.

However if there is too many queues not all of them are in view and I have to select text and drag the mouse down to view them. this is my frameset...


<frameset id="titleframeset" rows="76,*" framespacing="0" border="0" frameborder="0">

<frame noresize scrolling="no" framespacing="0" border="0" frameborder="0" name="titlebar" src="head.jsp">

<frameset id="mainframeset" cols="*,220" framespacing="0" border="0" frameborder="0">
<frame noresize name="windmain" src="postlogin.jsp" scrolling="auto">
<frame noresize framespacing="0" border="0" frameborder="0" name="queues" src="workqueues.jsp" scrolling="no" style="BORDER-RIGHT: gray 1pt solid;">
</frameset>

</frameset>

What I would really like is to have a couple of buttons at the bottom to perform the scrolling for me but I have never done anything like this with frames before. I have tried this little bit of code below to scroll it but its not moving it, got a feeling that because I have the scrolling set to "no" then these built in scrolling features don't work, but I'm really not sure.

function scrollQueuesDown() {
var queuesPane = window.top.queues;
var theTop;
if (queuesPane.document.documentElement && queuesPane.document.documentElement.scrollTop) {
// IE 6
theTop = queuesPane.document.documentElement.scrollTop;
} else if (document.body) {
// IE < 6
theTop = queuesPane.document.body.scrollTop;
} else {
// others
}

theTop += 20;
}

So is there an easy way to do this? I know I could put a div in a div and then move the div inside to produce a scrolling effect, or put in some dynamic overlaying so that I only display say 10 at a time. However id prefer a quick sollution if there is one so any help would be greatly received.

Thanks
Dale

Fumigator
09-04-2007, 07:50 PM
So you don't want a scroll bar but you do want buttons that take the place of a scroll bar. Huh? Why not just use the standard way to scroll a frame?

ellisd5
09-05-2007, 11:26 AM
Thanks for your reply
Its because the righthand pane is quite thin and having a scrollbar taking up 10 - 20px whatever it is really does ruin the formating and this screen, the users on the system hate it when it does it and it does make the page look ugly.

I can spare room at the bottom to have two buttons at the bottom of the pane that will scroll that window thus not taking up any room, so it currently would look like the light disgram but want it to look like right one...

~~~~~~||----------~~~~~~~~
~~~~~~||----------~~~~~~~~
~~~~~~||----------~~~~~~~~
~~~~~~||----------~~~~~~~~
-------------------Up Dwn

Hopefully this makes it clear, so is it posible to do easily, as I say I sure it possible by putting a div in a div with overflow hidden on and moving it but if there easier way then that would be great.

Thanks
Dale



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum