Easy Menu provides one way to change the menu item inner HTML at client side:
SetItemInnerHTML - has the following syntax:
ob_em_EasyMenuID.SetItemInnerHTML(id, innerHTML)
· id - The id of the menu item to set the new inner HTML.
· innerHTML - The content of the menu item to set.
Note:
- EasyMenuID is the id of the Easy Menu to which we want to add/remove the item.
- document.getElementById("EasyMenuID").object is the same as ob_em_EasyMenuID.
- If the specified item type doesn't exist for the current menu, MenuItem will be used by default.
Test changing the menu item inner HTML:
Here is the code for the buttons:
<input type="button" value="Set" onclick="ob_em_EasyMenu1.SetItemInnerHTML(document.getElementById('set_itemId').value,
document.getElementById('set_itemInnerHTML').value);">