Closed Thread Icon

Preserved Topic: scrolling menu's Pages that link to <a href="https://ozoneasylum.com/backlink?for=8225" title="Pages that link to Preserved Topic: scrolling menu&amp;#039;s" rel="nofollow" >Preserved Topic: scrolling menu&#039;s\

 
Author Thread
jive
Paranoid (IV) Inmate

From: Greenville, SC, USA
Insane since: Jan 2002

posted posted 07-01-2002 19:29

I'm having a problem with a script on this page

The problems I'm having are

1. I want to make the other two boxes on the right scroll down as well along with the two on the right.

2. I want to make it a little less bumpy and have more of a "glide" down effect after scrolling.

any ideas?



[This message has been edited by jive (edited 07-01-2002).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-01-2002 20:20

First, a question: do you understand the code you're using? Because if you did, I don't think it would be too hard for you to figure out how to get the boxes on the right to behave the same as those on the left.

jive
Paranoid (IV) Inmate

From: Greenville, SC, USA
Insane since: Jan 2002

posted posted 07-01-2002 21:18

I understand it enough to manipulate it, although I am still learning. The problem I have is that I get a javascript error when I put the <span id="scrollmenu" style="position:relative"> on the second set of tables. I don't know what I'm doing wrong, thats why I'm asking for help..

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-01-2002 22:04

Ah, OK. Well, the problem with that is you're not allowed to have two elements on a page with the same ID.

What I would recommend is to give it a different, but slightly similar ID, such as "scrollmenu2" or "scrollmenuright" or something, and then you'll have to duplicate the line

scrollmenu.style.pixelTop=document.body.scrollTop

with

scrollmenu2.style.pixelTop=document.body.scrollTop

Now, that said, the line I mentioned is incorrect. You should not just use the ID of an element to get access to id. Rather, you should use

document.getElementById('scrollmenu').style.pixelTop = ...

And, not only that, but instead of pixelTop, you should use just plain "top" and add "px" onto the end of the vallue, like this:

document.getElementById('scrollmenu').style.top=document.body.scrollTop + 'px';

The reason for this is that the way you were doing it will only work in Internet Explorer.

So you should have two lines that look about the same as that.

« BackwardsOnwards »

Show Forum Drop Down Menu