Forum Moderators: open

Message Too Old, No Replies

vertical scroller ....Help!

How to code a vertical scroller using graphics for scrollers

         

basketball man

10:02 pm on May 11, 2005 (gmt 0)

10+ Year Member



I saw a vertical scroller on this site that used
graphics for scrollbars and I wanted to know how to code a vertical scroller like this one which uses graphics to allow you to scroll up and down instead of the browser default scroll bar created by an iframe. Here is the site [denniseusebio.com...] Please, some one give me an idea of how they coded this javascript. And in what part of the page do you put this code.

Thanks

orion_rus

10:47 pm on May 13, 2005 (gmt 0)

10+ Year Member



It's a very simple coding. All you need is one div(or span) in another div.
First div would be a visible area with fixed widh and height.
Second div didn't have sizes, it just inside first.
Scroller have a onmousedown and onmouseup event. It fixes if drag begans. Onmousemove scroller event detects if you began drag it and call a function which changes the height of the inner div, then you drag it down your second div have -4,-10,-15,-20px position, but you see only text what starts from 0px position.
I hope i was clear
good luck to you

Rambo Tribble

4:06 am on May 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a lovely effect, but it won't win any accessibility awards. Without JavaScript and a mouse, the page doesn't work.

basketball man

4:23 am on May 15, 2005 (gmt 0)

10+ Year Member



Thanks for responding to my post. but what I found odd was that I used internet explorer to copy the web page graphics , html file and javascript files to my hard drive. But here's the thing. I opened up the page in dreamweaver, pasted the code in a new untitled dreamweaver document, previewed it in both netscape and ie and the scroller wouldn't work. I changed the path of the javascript file and everything and it still wouldn't work. But when I previewed the web page that I originally opened up in dreamweaver in netscape and ie, it worked. whether I changed the path of the javascript file or not. The only thing that seemed to stop the scroller from working was deleting the javascript file link completely(sorry about the spelling). So what's going on? Why would taking the same exact code and pasting it in a new document cause the pasted code to not work in the new document? Help.

Ohioian

2:00 pm on May 15, 2005 (gmt 0)

10+ Year Member



Doesn't the color/design scroll only work (appear) in IE? I don't think you see it in Mozilla products.