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: Saturday July 14 2012 - 06:07:15

"Follow scrolling" doesn't work properly?


Poster: Morning Kitty
Dated: Tuesday February 7 2006 - 7:35:23 GMT

I can't manage to set my follow scrolling menu top start position 10 in pixels.

I tried:
followscroll="10";
followscroll='10';
followscroll=10;
Neither worked. All I get is always top start position = 1!

However follow scrolling menu in examples work properly.
What should be the exact line of followscroll attribute? Thanks!


Poster: Migru
Dated: Tuesday February 7 2006 - 9:47:56 GMT

Hi

try

Code:
followscroll=1; 


This is not the start position of followscroll but the "switch" to enable followscroll.

See http://www.milonic.com/menuproperties.php
Quote:
followscroll 19 setting followscroll to 1 will activate the ability for absolute positioned menus to remain viewable within the browser window should the user scroll down the page.

You have to set the start position by the

Code:
top=10;
left=10;


or whatever you want.

Michael


_________________
Help Links
Beginner
http://www.milonic.com/forum/viewforum.php?f=14
http://www.milonic.com/tablemenu.php
Menu Reference
http://www.milonic.com/styleproperties.php
http://www.milonic.com/menuproperties.php
http://www.milonic.com/itemproperties.php


Poster: Morning Kitty
Dated: Tuesday February 7 2006 - 11:11:22 GMT

This sets only the position eg 10 pixels ONLY AT THE TOP of the page like this:


*TOP*
10 pixels here between top of the screen and menu
*MENU*


But when you add followscroll and make it follow you down the page, the menu will move and stick at the top (=0 pixels) on the screen like this:


*TOP*
0 pixels here between the top of the screen and menu
*MENU*

And i need this be eg. 10 pixels from the top TOO. Just don't know how.


Poster: Migru
Dated: Tuesday February 7 2006 - 11:47:03 GMT

Hi

Unfortunately, it is always difficult to forward advice, when there is no url given where needs can directly be studied and the code which is used can be seen.

I´ve not yet used this "followscroll", but having just studied the sample page (sample 10) , I see what you mean and will look into that.
in fact it is the followScroll parameter to be set to 10

followscroll='10';

and I´m wondering why this will not work in your case !

try followscroll=10px;

I just inserted in one of my testpages the

Code:
followscroll=10;


and it works, definitely !!!
There must be something different in your setup, syntax error or anything else. Can´t you provide a url???

The followscroll is set as a menu property in the mainmenu file as follows

sample
Code:
with(milonic=new menuname("mainmenu")){
top=100;
left=40;   
style=style_main;
alwaysvisible=1; 
alignment="left"; 
followscroll=10;   
orientation="horizontal";
aI(......)

Michael


Poster: stevvi
Dated: Tuesday February 7 2006 - 14:57:39 GMT

Doing as Migru says works for me too. I do have another question related to this though. How do I set the menu to scroll but be flush with the top of the browser window? Obviously, if I set the value to 0 the menu won't scroll.

Thanx


Poster: Ruth
Dated: Tuesday February 7 2006 - 15:24:49 GMT

Hi All,

There's an explanation about followscroll by Kevin in the following post.

http://www.milonic.com/forum/viewtopic. ... 6027#16027

Go down below where Kevin posted the code for the person to the line:
For the benefit of Bob and anyone else reading this thread...

Hope this helps

Ruth


Poster: Migru
Dated: Tuesday February 7 2006 - 15:26:54 GMT

Hi, tested it

setting it to "1" enables it and the minimum positive value is selected.
setting it to "0" of course disables it.
setting it to "x" sets it to a top=x; property.

I tested it with a negative value. It works, although not really useful, but feasible as long as it is visible and "clickable".
Please accept a personal comment:
So why should it be "flush" with the top of the browser? If it has a border set, you could set the followscroll to -1, but I do not consider this as an elegant solution.
Anyhow, I´m not using it at all, because I´m not using too long pages and some visitors normally know that the menu is on top of the page and they feel disturbed (that was the feedback) by a flashing or moving / twinkling "something" on top of the browser window, particularly when they are working with a slow machine.
Michael


Poster: Morning Kitty
Dated: Tuesday February 7 2006 - 16:14:30 GMT

I got why it doesn't work, but it's still a problem.

'Followscroll=10;' works fine alone, but when you add 'screenposition="center"' it makes the value of followscreen equal to zero! Try:

1) This works (it's as in examples):

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll=10;
orientation="horizontal";
style=menuStyle;
top=9;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Samples;text=Menu Samples;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=My Milonic;text=My Milonic;");
}

2) And this not (it's just center screenposition added):

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll=10;
orientation="horizontal";
screenposition="center"
style=menuStyle;
top=9;
aI("status=Back To Home Page;text=Home;url=http://www.milonic.com/;");
aI("showmenu=Samples;text=Menu Samples;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=My Milonic;text=My Milonic;");
}

So my question now is how to use 'screenposition="center"' AND '"followscroll=10;"' together?


Poster: Migru
Dated: Tuesday February 7 2006 - 16:31:34 GMT

In my testpage it is working together

with

screenposition="center"; //(with Semicolon !!!)


and the screenposition set before the followscroll set
but this might be by accident as I´m setting normally the top/left/positon/orientation settings before anything else.
So the order might be of no importance, but it works.

Michael

Just found, even omitting the semicolon keeps it working.... (IE)


Poster: Ruth
Dated: Tuesday February 7 2006 - 17:20:56 GMT

Hello All,

In order to use screenposition and also get the followscroll to follow and stop at 10px from the top, instead of using top=9; you need to use top="offset=9"; I'm not sure if your 10 in the followscroll is actually setting it at 10, or if the top="offset=9"; is stopping it at the 9px, kind of hard to see a 1px difference.

Tested in IE5.5, FF, NN, Opera 7.54

Ruth


Poster: Migru
Dated: Tuesday February 7 2006 - 22:22:35 GMT

Hi

yes - correct

forgot to note that I´ve been testing it not from

top=9;
but having set
top=95; in my menu.

Michael


Poster: vikenk
Dated: Wednesday February 8 2006 - 3:30:09 GMT

Ruth wrote:
In order to use screenposition and also get the followscroll to follow and stop at 10px from the top, instead of using top=9; you need to use top="offset=9"


Ruth is, of course, correct. I can confirm from experience that setting "top="offset=9"; is the way to go.

The menu will followscroll and float down to the offset position. In my case, however that's the effect I *didn't* want and had to figure out how to make it stick to the top.


Poster: Morning Kitty
Dated: Wednesday February 8 2006 - 8:53:08 GMT

Combining top offset with scrren position works fine, BUT it makes the menu unusable because of the flickering it produces. I don't know why? Because of the image and overimage commands? Try:

Code:
with(menuStyle=new mm_style()){
bordercolor="#000000";
borderstyle="solid";
borderwidth=0;
fontfamily="Verdana, Arial, Helvetica";
fontsize="7pt";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#ffffff";
headercolor="#000000";
imagepadding=0;
offbgcolor="#0fffff";
offcolor="#000000";
onbgcolor="#ffffff";
oncolor="#e14200";
outfilter="Fade(Overlap=1.00)";
padding=0;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
followscroll=10;
top="offset=9";
screenposition="center";
orientation="horizontal";
style=menuStyle;
margin=0;
aI("image=0.gif;type=header;");
aI("image=1.gif;overimage=1on.gif;url=index.htm;");
aI("image=2.gif;overimage=2on.gif;url=biografia.htm;");
aI("image=3.gif;overimage=3on.gif;url=opismangi.htm;");
aI("image=4.gif;overimage=4on.gif;url=opisanime.htm;");
aI("image=5.gif;overimage=5on.gif;url=indeks.htm;");
}


Poster: Migru
Dated: Wednesday February 8 2006 - 9:40:53 GMT

Hi

Confirm, see that flickering, when the mouse pointer moves over the menu.
That is after scrolling only! Did some testing, at the moment can´t give any further comment.


Michael

No, not the gifs !! When I replaced top="offset=9"; with top=10; of course it started with setting the menu to top=10; subsequently setting the menu to the windows top margin. But the flickering was no longer there.


Poster: vikenk
Dated: Wednesday February 8 2006 - 13:19:09 GMT

In my experience, setting followscroll to anything but "1" makes it behave strange. In this case, I believe, it's a binary command, ie; 1=on, 0=off.

In fact when setting followscroll parameters yourself, you must use a 3 number system, ie followscroll="1,2,5"; see
Code:
http://www.milonic.com/menusample10.php


Change the values of the scroll speed, etc in the form in the middle and see how the followscroll syntax changes.

For now, try doing followscroll=1; and see what happens. Using 1 instead of 10 will just say Followscroll is on. It has default parameters.

Hope this helps. Let us know how it works.


Poster: Migru
Dated: Wednesday February 8 2006 - 13:39:35 GMT

Hi

checked this too,

could not get any 3-parameter setting work in a reasonable way!!
I´m sorry can´t spend more time with this.
Don´t use this offset, and the thing works. (if you want followscroll=1).

Michael


Poster: vikenk
Dated: Wednesday February 8 2006 - 14:06:44 GMT

Migru wrote:
could not get any 3-parameter setting work in a reasonable way!!


I couldn't get it to work either, that's why I gave up on it and used followscroll=1;


Poster: vikenk
Dated: Thursday March 9 2006 - 3:42:37 GMT

Quote:
In my experience, setting followscroll to anything but "1" makes it behave strange. In this case, I believe, it's a binary command, ie; 1=on, 0=off.


Hi,

Just an update. It turns out I was wrong about the way followscroll works. I will quote a reply that Andy gave to a recent post of mine:
Quote:
If followscroll is a positive value, it is switched on. The value specified for followscroll is the offset from the top of the page whilst the user is scrolling down the page. The top value is where the menu will sit when scroll top is zero i.e. at the top of the page. It all gets very confusing when you add screenpositions, that's why I removed it.


To see the whole thread, read here:

http://www.milonic.com/forum/viewtopic.php?t=7245

Hope this helps.