followscroll to stay 1 px from the top with screenposition o

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

followscroll to stay 1 px from the top with screenposition o

Post by 4viggo »

How do i get followscroll to stay 1 px from the top when scrolling, and at the same time using the screenposition feature? :?

with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=100;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");

The followscroll stays 75px down the screen all the time. :(

Any suggestions anyone?

Regards
4viggo
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Followscroll can take up to three parameters...see these for examples.

viewtopic.php?t=2064

viewtopic.php?t=2314
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

Post by 4viggo »

Tried it with the 2 extra parameters, but the main menu is still adjusting it self 75px down the screen when you are scrolling. :(

code:

with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1,100,2";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=60;status=Back To Home Page;");
aI("text=Menu Samples;itemwidth=120;showmenu=Samples;");

Whitout the screenposition it works fine :?

Any thoughts to why the screenposition is screwing up the followscroll?

regards
4viggo
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

There has been a few fixes on the screenposition/followscroll combinations as of last week.

It might be an idea to upgrade your menu source files and see if it helps

Regards
Andy
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

Post by 4viggo »

Thanks Andy. :D

downloaded the latest version as of:
Version 5.0 Release Candidate 12.0 Built: Saturday September 27 2003 - 15:32

It has the same problem still, the top="offset=75"; overrides the followscroll parameter of 1px so the menu stays 75px down the screen when scrolling. :cry:

regards
4viggo
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Oh I see the problem now.

You've got the menus screenposition set to "center", that's fine.
You've also got an offset of -20 for left position, that's fine too.

But, you've got an offset for the top position, not fine.

The problem is, an offset is always relative to something else and in this instance the top offset isn't relative to anything because nothing has been specified for the top position - This is where it can get complicated.

Anyway, to cut this story short. If you change the top position from an offset to an actual position it will work. I'd suggest changing top="offset=75"; to top=75;

Hope this helps
Andy
User avatar
4viggo
Super Advanced
Super Advanced
Posts: 56
Joined: Wed Jun 12, 2002 12:03 pm
Location: Norway

Post by 4viggo »

Thanks Andy
The absolute position and RC12 fixed it. Great work :D

The only snag left is, it's not possible to specify the amount the menu should stay from the top when you scroll. It stays at 1 px no matter what you set the followscoll parameter at.
That's no big problem for me :o just thought i should let you know.

Thanks again for all the help.

regards
4viggo
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

OK then I'll take a look, could be a bug.

Cheers
Andy
Hardowin
Beginner
Beginner
Posts: 4
Joined: Mon Aug 12, 2002 10:43 am

Post by Hardowin »

Andy wrote:OK then I'll take a look, could be a bug.

Cheers
Andy
Hi Andy,

Did you found something, i'm havingthe same problems.
I downloaded the latest Version of the menu.
But i'm still having this problem.

Hardowin
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

A URL would be helpful, as requested.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

For other intrepid readers... solution (I hope) posted in this thread.

Kevin
Post Reply