Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:28

followscrolling: how to align exactly to top ?


Poster: pintronic
Dated: Wednesday August 20 2003 - 9:51:05 BST

On the Milonic "Follow Scrolling" sample-page it is possible to change the top position value to "0". After the update-click the menu aligns exatly to the top when scrolling.
When I edit my menu-file to followscrolling=0 the menu doesn't scroll anymore.
What have I to edit, to get the same effect as on the Milonic sample.

Thanks in advance
-dp-


Poster: fredlongworthhighschool
Dated: Wednesday August 20 2003 - 11:58:22 BST

The followscroll variable is just a 0 or 1 setting. The help page says that it is for 'absolute' positioned menus'.


Poster: McTristan
Dated: Wednesday August 20 2003 - 14:20:39 BST

__at__ pintronic:

you may use the "top"-variable to specify the exact position of the menu and where it should stay while scrolling. Best thing is to use it in conjunction with "left" and/or "screenposition".


Poster: John
Dated: Wednesday August 20 2003 - 14:58:25 BST

Not sure about 'screenposition' (it's early here!), but this example might help. See http://www.west.asu.edu/sa/testsite/sl1.htm. That tiny 2-line white-on-maroon box near the upper left is the menu. Note the initial position is 209px down from the top of the window. As you scroll the menu then comes to rest just 1px from the top. The guts look like this...

Code: Select all

with(milonic=new menuname("mainmenu")){_c=1
top = 209;
left = 2;
style = mainStyle;
alwaysvisible = 1;
itemwidth=100;
followscroll = "1,100,2";
aI("text=ASU West;url=http://www.west.asu.edu/;title=ASU West home page;status=ASU West home page");
aI("text=Student Affairs;url=http://www.west.asu.edu/sa/;title=Student Affairs home page;status=Student Affairs home page");
}

The trick is followscroll. Here is the explanation from the boss...
The first parameter is the Top position that the menu will move at. Set it to 1 and the menu will scroll to pixel position 1. Set it to 100 and it will remain at pixel position 100. It's difficult to explain so might be an idea to try it out. Parameter 2 is the rate at which it scrolls and parameter 3 is the number of cycles per second, (or is it milliseconds, sieve like brain at the moment)

Using followscroll in this manner could allow for multiple scrolling menus on the same page, with each scrolling at a different rate and stop point. Not entirely sure why you'd want to dish out a headache like that, however...


Poster: pintronic
Dated: Wednesday August 20 2003 - 16:13:21 BST

:)
Cool, it works now.
My explanation of the problem was not exactly, but it works fine now and aligns to the top edge when scrolling after it starts at top=60
I didn't knew that the followscroll attribute can get more than one parameter. I use ' followscroll="0,1," .

__at__ jgillet
thanks a lot

thanks to all who replied

bye

P.S. Does it work with v3.x too, and if yes how? It's not important, just interesting me.


Poster: John
Dated: Wednesday August 20 2003 - 16:19:52 BST

pintronic wrote:P.S. Does it work with v3.x too, and if yes how? It's not important, just interesting me.

Yes, but the implementation is a bit different.


Poster: Maz
Dated: Thursday August 21 2003 - 0:17:00 BST

Thanks for the help, although mine works fine it doesn't make any sense.

The ruler says top 72, but I have top set to 85 & followscroll 14,0 to be accurate. I may have to readjust for newer browsers.

When screenposition is on its smoother. Makes me think if only I could put top position within screenposition.

Thinking allowed :|
maz


Poster: Maz
Dated: Thursday August 21 2003 - 2:31:00 BST

Its already fixed.

Thanks Andy! :)