/    Sign up×
Community /Pin to ProfileBookmark

Scroll bar with a pointer

I need a scroll bar with a pointer, like this


—————————————- —–

[COLOR=white]………………………….[/COLOR]^ [COLOR=white]………………….[/COLOR] | 84|
[COLOR=white]………………………………………………….[/COLOR]—-

and a text box near it, which in will be writen how many percents of the scroll bar are selected.
The lenth of the scroll bar is generated with php, it’s a nomber.
The user will move the pointer and the value in the textbox should change…
Can you help please, I dont know how to realize that.

Thanks a lot, ssory for my bad English.

to post a comment
JavaScript

12 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterMay 04.2006 — I should really get a raise from my employers for being able to make such scripts within minutes ?

http://aplustv.com/public_stuff/scrollamountcounter.htm

[b]Edit:[/b]

Hmm... not working in Opera give me a minute.
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — Thank you very much,

but I said it a little bit wrong...

Just a bar, not a scroll bar, just bar, with a little pointer on it , that could be moved..
Copy linkTweet thisAlerts:
@UltimaterMay 04.2006 — Ok, I edited the link, works in Opera now too -- didn't understand the onscroll event so I add an onclick event as well. I also removed the content of the DIV so it's just a scrol bar now.

http://aplustv.com/public_stuff/scrollamountcounter.htm

If you don't want even this scrollbar, explain how the pointer on the bar is to be moved.
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — It is good but the amount of percents can be bigger then 100%

So in the end of it could be 150% and in the middle 75%

The max amount is generated with php so i don't know it.
Copy linkTweet thisAlerts:
@James_GatkaMay 04.2006 — 
-----
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — James, thank you very much but it doesn't work in Opera
Copy linkTweet thisAlerts:
@slaughtersMay 04.2006 — James, thank you very much but it doesn't work in Opera[/QUOTE]Which I'm sure will disappoint the less than 1 percent of the population that actually uses Opera. ?
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — In any case...

I need it work in Opera...
Copy linkTweet thisAlerts:
@UltimaterMay 04.2006 — <i>
</i>function recalc(){
var e=document.getElementById("affiliatesdiv");if(!e)return;
var e2=document.getElementById("prop");if(!e2)return;
var scrollPos=e.scrollLeft;
var maxScroll=(e.scrollWidth-e.offsetWidth);
var scrollPercent=(scrollPos/maxScroll)*[color=blue]155[/color]
e2.firstChild.data=Math.round(scrollPercent)+"%"
}

Will give you upto 155%. http://aplustv.com/public_stuff/scrollamountcounter155.htm
Copy linkTweet thisAlerts:
@slaughtersMay 04.2006 — In any case...

I need it work in Opera...[/QUOTE]
Which version 7? 8? 8.5?
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — I think 8 and 8.5

My one is 8
Copy linkTweet thisAlerts:
@snake12authorMay 04.2006 — Thank you, but I tried to make 2 scroll bars that the sum of the percents will be 155/

If you are scrolling to 80 percents in the first one - the second one is being scrolled down to 155-80=75 to 75 percents
×

Success!

Help @snake12 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...