/    Sign up×
Community /Pin to ProfileBookmark

Out of my League – help please

First let me say, if I am posting this in the wrong location, please disregard.

I am trying to change a javascript on my web page, but i have to admit i have never done anything with java before. I had a guy publish this site [url]www.gototodd.com[/url] for me awhile ago and he has since gone MIA.

Anyway, if anyone can help me with something that seems simple enough, but i can’t seem to figure out.

The scroll box on the left side scrolls up and i would like to change it to scroll down.

Any help would be greatly appreciated.

Here is the script:
<!– Begin
var contentobj = null;
var contentheight = null;
var iens6=document.all||document.getElementById
var ns4=document.layers
var scrollspeed = 30

function GetObj(name) {
if (document.getElementById) return document.getElementById(name);
else if (document.all) return document.all[name];
else if (document.layers) return document.layers[name];
return null;
}

function scrollup() {
if (contentobj == null) getcontent_height();
if(window.scrolltimerdown) clearTimeout(scrolltimerdown);

if(iens6) {
if (parseInt(contentobj.style.top)>=(contentheight*(-1)+100)) {
contentobj.style.top=parseInt(contentobj.style.top)-step
}
else {
shifttotop()
}
}
else {
if(ns4) {
if (contentobj.top>=(contentheight*(-1)+100)) {
contentobj.top-=step
}
else {
shifttotop()
}
}
}
scrolltimerdown = setTimeout(“scrollup()”,scrollspeed)

}

<!– function to stop all scroll timers –>
function stopall() {
if(window.scrolltimerup) clearTimeout(scrolltimerup);
if(window.scrolltimerdown) clearTimeout(scrolltimerdown);
}

<!– function that shifts the object to top –>
function shifttotop(){
stopall();
if (iens6) contentobj.style.top = 0;
else contentobj.top=0;
}

function getcontent_height(){
if (iens6) {
contentobj = GetObj(“content”);
contentheight = contentobj.offsetHeight
}
}

window.onload=scrollup
// End –>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @tendlich 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.16,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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