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:38
Dummy Menuitem
Poster: Martin
Dated: Friday March 12 2004 - 1:10:53 GMT
Hi there,
I'm using a classic horizontal menu with vertical submenues. Usually the main main items (horizontal) are clickable (is this a real word?).
My customer wants, that those menuitems should be 'dead', but the behaviour should remain (Rollover, submenu popup) I tried to work with headers, but the result is not what I'm looking for.
Is it possible to 'disable' the url parameter, that means, a mouse click does not activate an url? The mouse pointer should also change form the hand to the default value.
Any ideas? thank you
Poster: Maz
Dated: Friday March 12 2004 - 2:56:06 GMT
Have you tried type=header; in the menuitem?
Check for more menustyles if that's what you needed.
maz
Poster: Martin
Dated: Friday March 12 2004 - 2:58:28 GMT
hi maz,
A header does no allow rollover, so far i remember.
Poster: Maz
Dated: Friday March 12 2004 - 3:52:22 GMT
Not really understanding, does pointer=
do what you want? I think thats the correct name.
maz
Poster: Andy
Dated: Friday March 12 2004 - 10:29:07 GMT
Try this menitem property:
type=disabled;
-- Andy
Poster: Martin
Dated: Sunday March 14 2004 - 21:14:33 GMT
Hi Andy,
This "type=disabled;" works perfect. The only incorrrect thing is: It does not chnage the mouse-pointer to the normal pointer
Poster: kevin3442
Dated: Tuesday March 16 2004 - 2:28:05 GMT
Hi Martin,
If I understand correctly, you want your menu to behave exactly as you had it, except that the main menu items that open submenus would not be clickable; i.e., when clicked, they would do nothing. So, for example, suppose you had a main menu item like this:
Code:
aI("text=Item Text;url=theurl.htm;showmenu=subMenuName;");
You could simply remove the url property from the call to aI(), so that the Item Text menu item would still open the subMenuName submenu when moused over, but would do nothing if clicked, like this:
Code:
aI("text=Item Text;showmenu=subMenuName;");
All of your already-defined mouseover propeties would still be in force.
The key point here is that a menu item does not have to have a url defined. Is that what you're after?
Cheers,
Kevin
Poster: Ruth
Dated: Tuesday March 16 2004 - 6:48:05 GMT
I think the mouse pointer will not change from a hand because even without a url if you're calling a menu it wants to have the hand, but I think you can code each one of those to tell it what pointer to use. Maz mentioned that also, and I believe it was in one of Maz's trials.
Ruth
Re: Dummy Menuitem
Poster: kevin3442
Dated: Tuesday March 16 2004 - 16:44:00 GMT
Martin wrote:
...The mouse pointer should also change form the hand to the default value....
Oops... forgot that part (thanks for "pointing" it out Ruth )
You can, as Ruth suggested, specify a pointer for each item, using the pointer property. If you wanted the menu item in question to open a submenu, do nothing onclick, and display the defualt pointer (the arrow), you could do this:
Code:
aI("text=Item Text;showmenu=subMenuName;pointer=default;");
The default pointer should be the arrow. If that doesn't work, you could be more specific, like this:
Code:
aI("text=Item Text;showmenu=subMenuName;pointer=arrow;");
Hope that helps,
Kevin
Poster: Martin
Dated: Tuesday March 16 2004 - 17:11:44 GMT
Hi,
Wow, this pointer attribute sounds cool to me. I will test it afterwards.
I had some EMails with Andy last night. The type=disabled; worked pretty well with version 5.05, but a bug was introduced . The next version had a different bug. Version 5.07 fixed the bug(s) and introduced a new one
The type=disabled; unfortunately works recursive now. All submenues are disabled also. Hopefully version 5.08 will fix this problem.
The world is full up with bug s--> It's like starship troopers and Andy plays the guy with the big gun...
I have to presentate the menu to my customer by tomorow (Swiss-Time)
Poster: Martin
Dated: Thursday March 18 2004 - 1:06:38 GMT
Hi there,
The pointer-attribute does not work at all. This attribute has no effect on the mouse pointer.
Also the type=disabled; does not work correctly on a internet explorer. The color of the font changes to a blue color. I think it takes my blue color defined as the default p-tag. It's weared.
I'm ruuning out of time right now and i have no solution to switch off a menu item in a professional way.
Andy: Do you have any ideas and plans to fix it?
Thanks
Poster: kevin3442
Dated: Thursday March 18 2004 - 1:24:19 GMT
Hi Martin,
Quote:
The pointer-attribute does not work at all. This attribute has no effect on the mouse pointer.
I'm not sure what's up with that. I just tried it (in the standard horizontal navbar download with v5.07) and it worked fine. In the sample, it seems like all of the main menu items, with the exception of "Home", are defined like you want yours (assuming I understood your descriptions). In other words, the "Menu Samples" item opens the "Samples" submenu when moused over, but does nothing when clicked because it does not have a url property. I added pointer=default; to all of the items that open submenus so that the arrow cursor shows instead of the hand; it worked in both IE6 and NS7.1 (inWin2k). I also tried pointer=arrow; and that worked in IE6 but not NS7.1.
I simply modified the "Main Menu" in the horizontal sample to be as follows (adding the pointer property):
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;pointer=default;");
aI("text=Milonic;showmenu=Milonic;pointer=default;");
aI("text=Partners;showmenu=Partners;pointer=default;");
aI("text=Links;showmenu=Links;pointer=default;");
aI("text=My Milonic;showmenu=MyMilonic;pointer=default;");
}
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;pointer=default;");
aI("text=Milonic;showmenu=Milonic;pointer=default;");
aI("text=Partners;showmenu=Partners;pointer=default;");
aI("text=Links;showmenu=Links;pointer=default;");
aI("text=My Milonic;showmenu=MyMilonic;pointer=default;");
}
I still get the mouseover effects (oncolor, onbgcolor, etc.), but no hand cursor. Isn't that what you're after? I don't think the disabled property is meant to do what you want.... I believe that's intended to be used to programatically disable menu items.
I haven't had time to test in anything but IE6 and NS7.1, but you say it didn't work at all? I don't get it. Can you post your test URL, or post the code for your main menu? Gotta go now, but I may be able to take a look later tonight or tomorrow.
Kevin
Poster: Martin
Dated: Thursday March 18 2004 - 1:37:46 GMT
Hi Kevin,
Sometimes it's not easy easy to describe technical problems in english, sorry
.
My main menu items should not be clickable, but they should behave like an normal menu item: If a submenu-item is selected, the main menu should also change the color (Font, background). This is one of the reasons, i can't remove the url-Parameter.
Or in other words: The should behave like always, but not clickable and the mouse pointer should change to the arrow.
Poster: Martin
Dated: Thursday March 18 2004 - 1:55:18 GMT
Hi kevin,
Thanks for your quick help. I made some tests also:
The pointer-thing works fine (also with Mozilla), if a menu item is not disabled. I guess this is an issue for Andy
It makes sense, that the pointer-attribute should also work for disabled menu-items. This would be user-friendly.
Unfortunately the type=disabled attribute does switch off the submenues (since version 5.06) and changes the font-color on IE to a fantasy value.
Poster: Ruth
Dated: Thursday March 18 2004 - 4:05:09 GMT
What exactly do you mean by disabled? Do you just want some text there that is not a link nor does it have a submenu? I made #3 below like that. I tried the following in netscape 6 [buggy browser, but works] 7.1, ie5.5, firebird .07 and it worked in all.
The has these 3 items in it:
Code:
1. aI("text=Poetry & More;showmenu=mysite;pointer=default;");
2. aI("text=Border Sets;url=http://www.poems2u.com/;pointer=default;");
3. aI("text=GuestBook;pointer=default;status=coming soon;");}
2. aI("text=Border Sets;url=http://www.poems2u.com/;pointer=default;");
3. aI("text=GuestBook;pointer=default;status=coming soon;");}
#1 gives me an arrow only and shows the submenu [i-beam in netscape]
#2 gives me an arrow, is clickable as a link since it has the url.
#3 gives me an arrow, is not clickable and shows the status message.
All of them do the mouseover/off color changes and whatever else I have coded in the menu styles.
Ruth
Poster: kevin3442
Dated: Thursday March 18 2004 - 20:12:57 GMT
Hi Martin,
Martin wrote:
Sometimes it's not easy easy to describe technical problems in english, sorry
Not to worry. Your written English is better than many native English speakers.
Quote:
My main menu items should not be clickable, but they should behave like an normal menu item: If a submenu-item is selected, the main menu should also change the color (Font, background). This is one of the reasons, i can't remove the url-Parameter.
OK. My first thought is that the descriptions I gave earlier, should do exactly that, assuming your pagecolor and pagebgcolor properties are set for the main menu's style. I checked your code, and it does appears that you've set pagecolor and pagebgcolor in your NavMainStyle. That got me wondering why I don't actually see them applied on your test site.
So, I made a quick test of my own and... it didn't work (IE6/NS7.1/Win2k). My test behaved as if pagecolor and pagebgcolor were not defined, and they definitely were. I did this test using v5.07 of the menu scripts (which is what you are currently using). Out of curiosity, I backed off to v5.0 5 (I don't have 5.06), and my test worked. Here they are, if you want to see:
v5.07 test v5.05 test
So, obviously something is different in the page matching between v5.05 and v5.07. I see in the version information notes that there were changes made to the "current page highlighting" in both 5.06 and 5.07. I have no idea what changes were made, so I don't know if my "failed" test with 5.07 is by design (i.e., it now works differently) or is the result of a bug.
I believe that if the page matching worked as it did in 5.05, you would have a simple solution. I'll post a topic reporting this. If you still have 5.05, you might want to try it, at least to see if the proposed solution is a viable one.
Kevin
Poster: Martin
Dated: Thursday March 18 2004 - 22:35:49 GMT
Hi Kevin,
Wow, you're the perfect guy for testing software. Thanks a lot.
I will wait until the next version arrives. Maybe the next version looks a bit different again. I'm sure, that Andy will fix the bugs.
My customer gave me some more time. No that's not really true, i have to fix more important things first...
With your results, i have a fallback solution anyway. Thanks again.
If a nice feature does not work on certain browsers like NS or Mozilla, that's not so important. 99% of all users are using IE anyway.
By the way: Did you like the site?
Poster: kevin3442
Dated: Thursday March 18 2004 - 22:53:05 GMT
Hi Martin,
Martin wrote:
...By the way: Did you like the site?
Yes, I like it. It has a nice clean look. I particuarly like the use of the 3d colors in the submenus; I use them myself on our current site. Have you tried a small Shadow() filter behind your submenus? It might enhance the 3d effect. I also like your subimage... but I'll resist the temptation to steal it!
Cheers,
Kevin
Poster: Martin
Dated: Thursday March 18 2004 - 23:02:09 GMT
Hi Kevin,
Good idea, i will play a bit with the Shadow() filter.
Poster: Andy
Dated: Friday March 19 2004 - 13:34:20 GMT
Hi,
I think we've completely missed the point here you know.
After looking at your first request a little closer (my speed reading technique is getting quite bad these days) I get the impression that all you want to do is deactivate the link on the menu items that are opening the sub menus.
If this IS the case, all you need to do is remove the url property from the aI() string
With regard to the page highlighting problem, I'm really having trouble testing this due to the filename technique you are using.
I'm guessing that this a Cold Fusion thing - my problem is that it goes against the standards of directory structures. Basically, if the system sees /index.cfm/0084035000000000000000 it will automatically assume that 0084035000000000000000 is a directory and add a / to the end. This is why it fails on my tests. Another problem is that my web browser isn't parsing 0084035000000000000000 as a html file, this I'm guessing could cause cross browser problems.
If somebody could explain how this works in Cold Fusion it may help me understand how to fix the problem. In all my years on the Internet I've never seen that format used before.
Cheers
Andy
Poster: Martin
Dated: Friday March 19 2004 - 14:09:26 GMT
Hi Andy,
My way to handle URL's has nothing to do with ColdFusion itself. It's a legal way to use URL parameters, often used by content managment systems.
Yes, this funny numbers are looking like a directory name, but it ins't. A URL parser manages the url. This technique was created to avoid to have the ?-sign in the url.
Instead of
index.cfm?0084035000000000000000
we have
index.cfm/0084035000000000000000
Now we are search engine friendly. The old rumour, that dynamic webpages are not made for search engines is now history. It's all server based. The browser (Any brand, any version) has no problem at all.
To use this technique, libraries are available for PHP, ColdFusion, ASP and other middleware.
Maybe your recognize now, that this technique is not exotic as you think.
If you want to be save for the future, i should continue to support url's like that. You can find tons of URL's like i use in the wild.
I never had problem with your great menu with my funny url's in other projects i made.
The good thing is: I removed the url property from the ai() string. It works. Everything works. Everything is perfect. Except: I'm hungry, it's time for lunch.
Poster: kevin3442
Dated: Friday March 19 2004 - 18:21:12 GMT
Hi folks,
Andy wrote:
...If this IS the case, all you need to do is remove the url property from the aI() string
I think we had reached that conclusion. But the lack of the required page highlighting came to light (good pun, huh?) and Martin assumed that a url had to be defined in the aI() string to get the required highlighting. I figured there was probably a solution using the pagematch property, but when I started to test that theory, I found that the page matching didn't seem to be working in 5.07... unless I totally did it wrong, which is always a possibility.
A question for you Andy... in comparing things to decide whether to highlight a menu item or not, I assume you compare the item's pagematch value to the current location... right? Are you looking for pagematch in location, as a substring (i.e. using indexOf() ).
I that's how it works, then let's take, for example, the first item in the main menu, "Über uns". It seems to me that all of the pages that can be gotten to from the submenus under "Über uns" all begin with
Code:
index.cfm/0084109
Could you then define the "Über uns" main menu item as follows:
Code:
aI('text=Über uns;showmenu=NavSub1_0;pagematch=index.cfm/0084109;pointer=default;status= .:. Über uns .:. ;');
Modifications to the current definition are (1) I removed the url property, so that clicking the item would do nothing, (2) added the pointer property so the pointer doesn't turn to a hand, (3) set the pagematch property to index.cfm/0084109... woud that cause the "Über uns" main menu item to be highlighted when any of the pages gotten to through the NavSub1_0 submenu were displayed???
OK... so that was more than one question....
Kevin
Poster: Martin
Dated: Friday March 19 2004 - 19:00:46 GMT
Hi Kevin,
Thanks for your feedback.
I had only to remove the URL-Thing and it works, including changing the colors, but works in my intranet only. I think, different problem occured. I opened this thread a while ago, to discuss the issue http://www.milonic.com/forum/viewtopic.php?t=3806
I think, its a problem with absolute and relative addressing. Please read the my last post.
I had the same idea to introduce pagematch . I have to play around a bit the get it running. If this feature runs really, it will fix some other cms-specific issues with teaser-articles and full-articles. But this is a different story...
Poster: Andy
Dated: Sunday March 21 2004 - 11:03:09 GMT
Version 5.09, now available should fix your problem.
Cheers
Andy
Poster: Martin
Dated: Sunday March 21 2004 - 16:30:29 GMT
Hi Andy,
The menu 5.09 does not work anymore.
This is the message:
The menu works in my intranet, but not on the productive server.
Poster: Andy
Dated: Sunday March 21 2004 - 16:37:50 GMT
You seen to have broken mmenudom.js.
There are missing characters that are part of the comments.
Try downloading the menu agian.
Cheers
Andy
Poster: Martin
Dated: Sunday March 21 2004 - 17:01:17 GMT
Hi Andy,
Your Source on the web-Server ist broken. I downloaded it again from the server. The file mmenudom.js is incomplet
Poster: Martin
Dated: Sunday March 21 2004 - 17:09:03 GMT
Hi Andy,
I repaired the file by myself.
Unfortunately, this release 5.09 does not show up the submenues anymore.
I didn't change anything, i replaced the file only.
Poster: Andy
Dated: Sunday March 21 2004 - 17:14:55 GMT
Try it now - it was the code that builds the downloads at fault, sorry about that.
Cheers
Andy
Poster: Martin
Dated: Sunday March 21 2004 - 17:30:03 GMT
Hi Andy,
I downloaded the files again. Now they a working.
I realized, that the serialnumber will be included automatically. Is that a new feature? If yes, it makes no sense for multi-license owners. They have to change the serial number matching the customer anway,
Still one bug is there: A selected menu item does not change the background color.
Poster: Ruth
Dated: Sunday March 21 2004 - 18:42:29 GMT
Just on the off chance this might be it....someone else had that problem, in their case it turned out that the url they had in the data file was http://www.whatever.com but if you typed that in the browser a / was automatically inserted perhaps something like that is happening and maybe the menu doesn't recognize it as the same. Just a thought.
Ruth