QUOTE (Hywel @ Mar. 27 2003,3:52)
Add a separator
Enable/Disable a command
Separators will probably be available in DynAPI 0.9a
Not sure though...
------
There's no function to Enable/Disable a command but its very easy to do so:
First of all obtain a reference to the command:
c = dmbAPI_getItemByCaption("Products");
Now, make a backup of the command's onclick and onmouseover events:
c.OMO = c.onmouseover;
c.OMC = c.onclick;
And now, set these events to "null":
c.onmouseover = null;
c.onclick = null;
--------
If you want to reactivate the command, simply use this code:
c = dmbAPI_getItemByCaption("Products");
c.onmouseover = c.OMO;
c.onclick = c.OMC;
I tried this Enable/disable script, but i can not get it to work. the c = dmbAPI_getItemByCaption("caption");
seems to work, but the c.onmouseover = null; c.onclick = null; doesnt.