Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 11807 | Replies: 14
![]() |
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 985
Reputation:
Rep Power: 6
Solved Threads: 51
well, it sounds like Nouvelle would rather manipulate focus than dynamically move the scrollbar, one could even set up a js timer routine to iterate between a vertical line of anchors, which would force movement of the scrollbar.
it would make a horrible clicking noise though... could also try using javascript to move focus through a vertical line of objects on a page. might be more graceful if movement is what's wanted.
it would make a horrible clicking noise though... could also try using javascript to move focus through a vertical line of objects on a page. might be more graceful if movement is what's wanted.
Plato forgot the nullahedron..
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 985
Reputation:
Rep Power: 6
Solved Threads: 51
•
•
•
•
could also try using javascript to move focus through a vertical line of objects on a page. might be more graceful if movement is what's wanted.
a'la http://www.fusiongroupuk.com/sillyscrolling
well. maybe it didn't turn out so graceful. once it starts moving you'll probably have to close your browser window.
Plato forgot the nullahedron..
•
•
•
•
a'la http://www.fusiongroupuk.com/sillyscrolling
well. maybe it didn't turn out so graceful. once it starts moving you'll probably have to close your browser window.
interesting concept!
theres also the window.scroll() and window.scrollTo() properties that allow you to move the scrollbar.
I use the following function (part of a larger lib) to get the window scroll offset:
[HTML]/**
* Current x/y scroll offset of the window
*/
window.scrollOffset = function(parent) {
this.x = 0;
this.y = 0;
var doc = parent ? parent.document : document;
var win = parent ? parent.window : window;
if (doc.documentElement && doc.documentElement.scrollTop) {
this.y = doc.documentElement.scrollTop;
this.x = doc.documentElement.scrollLeft;
} else if (doc.body) {
this.y = doc.body.scrollTop;
this.x = doc.body.scrollLeft;
} else if (win.innerHeight) {
this.y = win.pageYOffset;
this.x = win.pageYOffset;
}
}
// example use:
var vertical_win_scroll = (new window.scrollOffset()).y;
[/HTML]
together with window.scroll() you can achieve the same effect... though not as interesting...
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 985
Reputation:
Rep Power: 6
Solved Threads: 51
•
•
•
•
I use the following function (part of a larger lib) to get the window scroll offset: /// together with window.scroll() you can achieve the same effect...
that definately seems nicer =P
methinks on re-reading Nouvelle's post, maybe he/she wants to create another scrollbar around an object... you can do that with a DIV, and CSS:
div.scrollish{
overflow:scroll;
}
---OR---
div.scrollish{
overflow:auto;
}be aware, putting certain things in scrolling/auto scrolling divs screws them right up: if you put a table with width 100% in a div with a scrollbar, it goes underneath the scrollbar.
i had a similar concept on my website for user uploaded images in blocks of nicely laid out text, instead of resizing the image arbitrariliy i put it as the background image of a div, inside a sized div with scroll set to auto. i changed it because divs don't vertical-align properly >_<
oh, one final thing, you can't have an un-sized div with scroll set to auto. it wouldn't make sense =P
EDIT: I do still use them: http://www.fusiongroupuk.com/fuse-data/index.xrm. The IT section is big enough to cause its container to scroll. does that look like the sorta thing you're after?
Last edited by MattEvans : Nov 15th, 2006 at 1:13 am.
Plato forgot the nullahedron..
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode