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

Would alwaysvisible=0 ever be used?


Poster: blaine
Dated: Sunday April 22 2007 - 22:44:44 BST

Can anyone give me a reason/purpose where the menu option alwaysvisble would ever be 0 for a main menu.

Is it only used for sub-menus when you don't want the main menu to appear when you select a submenu. Even that seems like an awkard and confusing application.


Poster: Ruth
Dated: Monday April 23 2007 - 2:45:39 BST

Hi,

I don't have any idea. It may just be that in programming you have to have on/off 1/0. I think that's how computers work??? 1 on 0 off, binary codes or something, if I remember correctly from something I read decades ago :lol: So, anyway, I think that if you need to give a program two options, 1 on and 0 off, then you'd program it to understand that if it is coded 1 do this, if nothing is coded assume 0. In this case the default setting, that is what the program assumes if alwaysvisible is not set to 1, is 0. That is, if you don't have alwaysvisible coded to 1 and you don't have alwaysvisible coded to 0, then the program understands that it is 0, or not visible. As you can see by all my 'I thinks' this is only a 'guess' there may actually be some menu setups that require all of it to be codes, on and off, maybe for things like the extras menus, php, or mysql stuff.

Ruth


Poster: blaine
Dated: Monday April 23 2007 - 3:37:50 BST

Oh, my question was not about using 0 or 1 vs on of off. It's why or when is ever used to set the property alwaysvisble to 0 or off. I am in fact creating the menu's programatically from mysql via php but that should not be relevant.


Poster: Ruth
Dated: Monday April 23 2007 - 3:50:54 BST

Well, as I said, I don't know other than the guess I made about mysql and such. As far as I know you could go ahead and put in alwaysvisible=0; into all the submenus if you want.

Maybe it has to do with making personalized functions. There are some functions that have been created for things users in the forums wanted. They were created by Kevin who used to be able to help here, but unfortunately isn't able anymore.

This is to change menu properties using whatever this function is. At the bottom of the page is a link to 'other demos' using this function for other properties to change, the first one on that other demos page is changing alwaysvisible from 1 to 0. If you click the Alwaysvisible it will go to a page and that 'item' is no longer visible. I can't tell you much more since I am not js knowledgeable.



http://support.milonic.com/demos/change ... /index.htm


Poster: blaine
Dated: Monday April 23 2007 - 4:20:30 BST

Thanks Ruth and I guess that demo you pointed me too, also answers my other question I posted today about the reference number in the menu property guide.

Example function call: mm_changeMenuProperty("main menu", 7, 0);

The property 7 is the menu property alwaysvisible.


Poster: Ruth
Dated: Monday April 23 2007 - 7:36:27 BST

Hi,

You're welcome. There are a lot of demos that were done for users who posted here in the forum. Maybe some would be something of interest to you. I should have dropped the link to the main page

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

Only the ones in the top section were done from forum posts and they have no support since they were not created by Milonic. The one I play with a lot is the IE Filters one.

The ones at the bottom are from modules created by Milonic.

Ruth


Poster: Andy
Dated: Monday April 23 2007 - 9:41:48 BST

alwaysvisible is 0 by default and so it's not required unless you want the value to be 1

It basically denotes a main menu or not a main menu. Declaring alwaysvisible=0; is fine and acceptable just not very efficient.


Poster: blaine
Dated: Monday April 23 2007 - 13:43:26 BST

Andy,

I'm curious why the default is hidden. Would most users not want the menu visible?


Poster: Andy
Dated: Monday April 23 2007 - 14:38:03 BST

It's not that the default is hidden it's just that it's not needed so we don't bother to add it to the menu definitions.

There are currently 114 style and item properties and 33 menu properties. We couldn't possibly include them all in a menu or menu item object so the standard practice is to only declare properties that we need to change.

with alwaysvisible (and other properties) you only need to include it if you want the value to be other than zero


Poster: blaine
Dated: Monday April 23 2007 - 14:53:50 BST

Sorry Andy, let me rephrase that question.

Sounds like the default for this propoery "alwaysvisible" is 0 (hidden - do not show). And thus when creating the menu we need to include the property to have the menu appear.

with(milonic=new menuname("Site Menu")) {
position="relative";
alwaysvisible=1;';

Would we not 99% of the time want the menu to appear - thus why os the default 0?


Poster: Andy
Dated: Monday April 23 2007 - 15:19:55 BST

I think it's the name of the property causing confusion.

Think of alwaysvisble being the same as mainmenu - A main menu needs to be alwaysvisible whereas a sub menu does not.

Hope this helps,
Andy


Poster: blaine
Dated: Monday April 23 2007 - 15:21:25 BST

Uh, ok - thanks that helped :)