Dummy Menuitem

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Dummy Menuitem

Post by Martin »

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.

Image


Any ideas? thank you
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Have you tried type=header; in the menuitem?

Check for more menustyles if that's what you needed.

maz
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

hi maz,

A header does no allow rollover, so far i remember.
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Not really understanding, does pointer=
do what you want? I think thats the correct name.

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

Post by Andy »

Try this menitem property:

type=disabled;

-- Andy
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Andy,

This "type=disabled;" works perfect. The only incorrrect thing is: It does not chnage the mouse-pointer to the normal pointer
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

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: Select all

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: Dummy Menuitem

Post by kevin3442 »

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: Select all

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: Select all

aI("text=Item Text;showmenu=subMenuName;pointer=arrow;");
Hope that helps,

Kevin
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

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) :?
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

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
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Martin,
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: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://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
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

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.
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

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

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.
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

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;");}
#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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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.
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
Last edited by kevin3442 on Thu Mar 18, 2004 11:46 pm, edited 1 time in total.
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

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?
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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
User avatar
Martin
Mega User
Mega User
Posts: 113
Joined: Fri Jul 05, 2002 11:57 pm
Location: Zollikon, Switzerland

Post by Martin »

Hi Kevin,

Good idea, i will play a bit with the Shadow() filter.
cheers

====================================
Merlin Consulting
Martin Schaible
Bahnhofstrasse 27
CH-8702 Zollikon
====================================
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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
Post Reply