# Menus for web client

**URL:** <https://forum.servoy.com/t/menus-for-web-client/10213>\
**Category:** Classic Servoy\
**Created:** [January 30, 2009, 10:05pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213 "2009-01-30T22:05:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markhooper](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@markhooper](https://forum.servoy.com/u/markhooper)\
**Post date:** [January 30, 2009, 10:05pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213/1 "2009-01-30T22:05:08Z")

</div>

Do the built-in ‘plugins’ for menu work in web client ? I have a strong suspicion that they don’t.

For anyone who has built a ‘standard’ menu like: File, Edit, View, Help, etc for web client what did you do ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Gary\_R.Schaecher](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@Gary\_R.Schaecher](https://forum.servoy.com/u/Gary_R.Schaecher)\
**Post date:** [January 30, 2009, 10:57pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213/2 "2009-01-30T22:57:44Z")

</div>

We strung a bunch of popup menus across the top in a form that pretends its a tool bar. Looks kind of lousy, is sluggish as hell, but its the only thing Servoy offers at this time.

If they wan t to really compete with .NET I hope they fix this deficiency some day.

Gary

---

<div class="post-metadata">

**Author:** ![markhooper](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@markhooper](https://forum.servoy.com/u/markhooper)\
**Post date:** [January 30, 2009, 11:39pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213/3 "2009-01-30T23:39:58Z")

</div>

Thanks for your reply Gary.

I tried the ‘popupmenu’ plugin and I can get a simple popmenu to appear.  
However, a couple of things don’t work.

1. the createCheckboxMenuItem doesn’t paint me a checkbox (no biggie cause I really don’t need one at the moment)
2. the createRadioButtonMenuItem doesn’t paint me a radio button (no biggie cause I really don’t need one at the moment)
3. the ‘enabled’ property doesn’t get rendered (i.e. if I set a menu item’s “.setEnabled(false)” I still see the item normally in web client - it does work correctly in Smart Client… but I’m not interested in Smart Client.

Here’s a snippet of code (its really ugly but this is just a test mule at this point). The popupMenuSetup() method is involved for the ‘onAction’ event of a label I’ve placed at the top of one of my forms.

```auto
function popupMenuSetup()
{
  var menu = new Array(
  plugins.popupmenu.createMenuItem('A', junk1),
  plugins.popupmenu.createMenuItem('-'),
  plugins.popupmenu.createCheckboxMenuItem('B',junk2),
  plugins.popupmenu.createRadioButtonMenuItem('C',junk3),  
  plugins.popupmenu.createMenuItem('<html><b>Hello</b></html>',junk4)
  );

  menu[3].setEnabled(false);

  var elem = elements[application.getMethodTriggerElementName()];
  if (elem != null)
  {
    plugins.popupmenu.showPopupMenu(elem, menu);
  }

}

function junk1()
{
  var lv_junk1 = 0;
}

function junk2()
{
  var lv_junk2 = 0;
}

...

```

Any thoughts ??  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![grahamg](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@grahamg](https://forum.servoy.com/u/grahamg)\
**Post date:** [January 31, 2009, 3:51pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213/4 "2009-01-31T15:51:29Z")

</div>

AFAIK menus & dialog boxes are amongst the very few features that do not work in Web Client.

Two options are to use FormInDialog or to show/hide Tab Panel(s) with the menu choices that you require - both can be elegant and fast with the right code ![:)]( "Smile")

If you need some sample code post more info on what you want to achieve and I’ll be happy to dig something out.

Regards

---

<div class="post-metadata">

**Author:** ![srowe](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@srowe](https://forum.servoy.com/u/srowe)\
**Post date:** [February 3, 2009, 1:57pm UTC](https://forum.servoy.com/t/menus-for-web-client/10213/5 "2009-02-03T13:57:53Z")

</div>

I would be interested in sample code for menus in Web Client. I have applications that require several layers of sub menus.

Thanks.
