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:46

why the weird menu offset when placed in table!!


Poster: nwilcox
Dated: Tuesday December 19 2006 - 19:03:27 GMT

[address removed]

I have no offsets for the top menu yet it is offset vertically by 16pixels?

Here is my code:

//menu declaration

with(milonic=new menuname("TopMenu")){
alwaysvisible=1;
orientation="horizontal";
style=menuStyleTop;
aI("itemwidth=100px;itemheight=29px;text=contact us;status=contact us;url=/contact/contact.cfm;");
aI("itemwidth=155px;itemheight=29px;text=create new account;status=create new account;url=/member/create_account.cfm;");
aI("itemwidth=70px;itemheight=29px;text=home;status=home;url=http://www.asa-advantage.org;");
}

//style declaration

with(menuStyleTop=new mm_style()){
bordercolor="#948E63";
borderstyle="solid";
borderwidth="2px";
fontfamily="Times, serif";
fontsize="16px";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#948E63";
offcolor="#FFFFFF";
onbgcolor="#C6C19B";
oncolor="#FFFFFF";
outfilter="";
overfilter="";
padding=0;
pagebgcolor="#638663";
pagecolor="#FFFFFF";
separatorcolor="#C6C19B";
separatorsize=1;
separatorheight="15px";
separatorpadding="1px";
subimage="";
subimagepadding=0;
rawcss="text-align:center;"
screenposition="top=-16px;"
}


okay pretty straght forward right? I'm at a total loss for words here...


Poster: Ruth
Dated: Tuesday December 19 2006 - 19:48:12 GMT

Hi,

You don't have position='relative'; in the main menu that's in the table. Also, this code screenposition="top=-16px;" is not a style property, it is coded in the actual menu, though it seems you are using it to try and move the menu back into position and the position='relative' will do that so you don't need the offset.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 19:51:44 GMT

EDIT

wow.. now when I click on the middle button I get this weird shifting in IE 7.. like it animates and removes left padding from my buttons

yikes... that is something new!

duh! I'm retarded

thanks Ruth.. that did it!

while I've got you... I can't get the pagematch to work with page anchors?

I've got a menu with 6 items each going to the same physical page with different anchors. None of them are highlighting?

I tried using pagematch and it didn't do anything :(


Poster: Ruth
Dated: Tuesday December 19 2006 - 20:02:40 GMT

Hi,

Sorry, i need the url back so I can get the anchor page where those are and experiment.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 20:03:38 GMT

http://www.asa-advantage.org/resources/ ... ?devtype=1

sorry... both issues are very perplexing

thanks for your help!


Poster: Ruth
Dated: Tuesday December 19 2006 - 20:04:12 GMT

Never mind, I got it from downloading the page :)

Ruth


Poster: Ruth
Dated: Tuesday December 19 2006 - 20:15:42 GMT

Hi,

The page match isn't going to work with just the anchor, you need to have the full path in each. i.e.

Code:
aI("text=Objectives;status=Objectives;url=/info/info.cfm#objectives;pagematch=/info/info.cfm#objectives;");


That should work. Of course my test was using info.htm since I don't have cf but it worked.

I can't help with IE7, you might have to post a separate topic. Check the css padding code and table, td, tr code and margin codes, they sometimes affect the menu.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 20:20:13 GMT

okay I just tried the full path with the pagematch and it still doesn't work...

any other suggestions? Is it an issue because all the links are to the same page?

The other weird IE7 issue was fixed when I put a fixed width on the overall menu...


Poster: Ruth
Dated: Tuesday December 19 2006 - 20:34:02 GMT

Well, I don't know on the pagematch since when I tried it was working. You might try the 'full' path to the info.cfm page, the http etc., when I tried it on my desktop all the files were in the same folder so I just had info.htm#objectives as the match.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 20:41:28 GMT

okay I tried the full path including the HTTP for both the URL and the pagematch parameters.

Now regardless of the page I go to in that menu, my second menu item is staying highlighted

yikes ... now I'm even more confused


Poster: Ruth
Dated: Tuesday December 19 2006 - 20:52:31 GMT

Hi,

That's because the intellectual page is development.cfm?devtype=1 and that is the page of the link you provided so there is a match and that makes the Personal Development item highlight as well as the Intellectual child item.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 20:59:31 GMT

http://www.asa-advantage.org/info/info.cfm#objectives

I'm sorry Ruth I gave you the wrong address

If you look at the Program Information menu that is what I'm having problems with

Thanks! ;)

PS... I just tried it again and it appears to work the first link you click on in that menu

Then the rest of the links I click, the pagematch stays on the first link I clicked. This is the Program Information menu


Poster: Ruth
Dated: Tuesday December 19 2006 - 21:35:16 GMT

Hi,

It seems that once one of those items is clicked when you click another the menu thinks it already has initiated the pagematch. I don't know if that's something the menu can do, match a number of anchors on a page. I'll ask Milonic. It just may not be possible. I did find something you can do to show that the link is clicked, but it will be that color as long as you're on the page even when you click another one of the anchors so they all end up being colored. You could use different colors? Anyway, while I try to find out if pagematch can be done on anchors on the same page in place of pagematch you could use clickbgcolor= and clickcolor= in each of those items. You might want to do different colors as to bgcolor that way they'd look different after they were clicked.

Ruth


Poster: nwilcox
Dated: Tuesday December 19 2006 - 21:39:40 GMT

awesome thanks Ruth

I really appreciate your assistance today!

This is the first time I've come across the anchor issue but it seems to be something that could happen with other customers...

:)


Poster: nwilcox
Dated: Wednesday December 20 2006 - 17:52:02 GMT

Hi Ruth,

Any updates from Milonic on my quest to figure out the page anchor issue?

Thanks!


Poster: Ruth
Dated: Wednesday December 20 2006 - 19:14:26 GMT

Hi,

No, no updates. I did post it and I'm sure they'll do what they can if it's possible. It may require too many parameters or variables to try and get multiple anchors on the same page to work with pagematch. If you check the Menu Version info when a new version comes out it will tell you what has been fixed, if it's a fix and anything new that gets put in. That page also has pre-releases available to test them as they are in development.

http://www.milonic.com/menuvinfo.php

Ruth


Poster: nwilcox
Dated: Wednesday December 20 2006 - 19:35:20 GMT

thanks Ruth... much appreciated

I think I may know why it isn't working. When you go to a page anchor iwthin a page, the page is never refreshed so the menu doesn't have a chance to catch up with the browser.

I don't think what I want to do is possible unless I refresh the page after I hit the link?

yup I just tried it and that appears to be the case. It is the lack of page refresh when linking to page anchors within the same page!

ack!


Poster: Ruth
Dated: Wednesday December 20 2006 - 20:17:25 GMT

Hi,

Thanks for the info, that's helpful for anyone else who asks about it. It looks like the clickbgcolor or clickcolor or both are your best options. At least if you used clickcolor it would be a kind of 'visited' link. You can't use visitedcolor because once you click one all the other anchors with visitedcolor property set also turn, before you've clicked them. So, at this point it looks like just the click options will work.

Ruth


Poster: nwilcox
Dated: Wednesday December 20 2006 - 20:29:11 GMT

well are each menu item links referencable via the JavaScript DOM?

I coudl write a function that turns the current click color and click bgcolor and turns hte other ones off. However I'd need a way to access the individual menu links programmatically.

Thanks!


Poster: Ruth
Dated: Wednesday December 20 2006 - 21:18:40 GMT

Hi,

You can do that, but you are way over my head. I know there are methods and functions. I know you can 'find' items using these, but I don't really know what any of that is. My knowledge of js is limited to knowing you spell it javascript.... :lol:

You might try the methods and functions page that might give you some ideas. Sorry :(

http://www.milonic.com/menu_methods.php

Ruth


Poster: Ruth
Dated: Wednesday December 20 2006 - 21:22:48 GMT

Also, you might take a look at the demos page. It has a bunch of things that Kevin did and he wrote functions for them so maybe one of those will provide you with info you can use. Maybe the change item property, change menu property, bread crumb and pass item reference would be something that might use what you mentioned. What do I know??? :?

http://support.milonic.com/demos/


Poster: nwilcox
Dated: Wednesday December 20 2006 - 21:26:18 GMT

thanks! I'll definitely do that.

Maybe I'll hear something about my issue in a next release.. if it really is an issue... it may just not be feasible at this point.


Poster: Ruth
Dated: Wednesday December 20 2006 - 22:04:17 GMT

Hi,

I posted the last two one right after the other so I don't know if you got the first one which had a link to the methods and functions page on it. So just in case

http://www.milonic.com/menu_methods.php


Poster: nwilcox
Dated: Tuesday January 2 2007 - 17:59:14 GMT

Hi Ruth

checking in on the status of my question. Is the pagematch on anchors going to be possible?

Thanks!


Poster: Ruth
Dated: Tuesday January 2 2007 - 18:10:21 GMT

Hi,

I haven't heard anything. I'll post to Milonic again. End of the year is kind of hectic, I believe :)

Hope you had great holidays!

Ruth


Poster: nwilcox
Dated: Tuesday January 2 2007 - 18:15:07 GMT

I hear that!

I had a great holiday how about u?

Thanks for the followup!


Poster: Andy
Dated: Saturday January 6 2007 - 14:03:13 GMT

Pagematch on anchors should be available in the next release of the menu.

The Pre Release version of the menu (V. 5.767) should already contain this fix from http://www.milonic.com/menuvinfo.php

HTH,
Andy


Poster: nwilcox
Dated: Saturday January 6 2007 - 18:34:01 GMT

sweet! thanks guys. Appreciate the effort on this one.

:)


Poster: nwilcox
Dated: Monday January 22 2007 - 21:33:42 GMT

hey all...

I've uploaded the new menu source files to my site and the anchors are still not highlighting when I select each one from the menu.

Is there something I need to alter in my menu_data file to address this?


Poster: Andy
Dated: Tuesday January 23 2007 - 22:01:44 GMT

They do appear to be working but you need to refresh the page in order to get them to work as expected.

Do you need something that will activate the correct item even though the page is not re-loaded?


Poster: nwilcox
Dated: Wednesday January 24 2007 - 1:39:09 GMT

yes that would be awesome!

Ruth said you guys were looking making pagematch work with same page anchors.

I wondered it if was even possible since the page doesn't really refresh but simply move up and down the page.