disable menu item

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

disable menu item

#1

Postby xren » Thu Jan 24, 2013 4:00 pm

I like to disable a menu item. Currently I use this code in javascript before page:

controls.MENUITEM1.setEnable(false).

However, it still changes when hover, and still clickable - though no action after click.

I would like to have it totally greyout and not clickable when disable it. How can this be done?

Thanks,
Xiaoli
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#2

Postby Wai » Fri Jan 25, 2013 12:26 pm

Hi Xiaoli,

The simplest approach would be to hide the menu item. Is there any reason not to do that instead?
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Fri Jan 25, 2013 3:14 pm

We would like user know that they have the choice but sometimes, it is disabled.

Xiaoli
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#4

Postby Wai » Fri Jan 25, 2013 4:19 pm

In that case, you can try styling the menu item in javascript as well. After you set it as disabled, set it's style, and hover styles to look greyed out.
0 x


Who is online

Users browsing this forum: No registered users and 50 guests