Hello,
We are trying out if your menu control fits our needs, and it looks pretty well except one javascript problem which I cannot solve and can't find how to work around it.
When the menu has at least one separator, the setDisabled function on menu items crash with this message:
Code:
'this.apu.tagName' is null or not an object
Everything starts working fine after removing the IsSeparator="true" attribute.
This is the page to reproduce this:
Code: HTML/ASPX
<%@ Page Language="C#" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<script type="text/javascript">
function setDisabledRecursive(menuGroup)
{
for (var i = 0; i < menuGroup.getItemCount(); ++i)
{
var menuItem = menuGroup.getItemByIndex(i);
var subGroup = menuItem.getSubGroup();
if (subGroup)
{
setDisabledRecursive(subGroup);
}
menuItem.setDisabled(!menuItem.getDisabled());
}
}
function menu_loaded()
{
var menu = eo_GetObject("menu1");
setDisabledRecursive(menu.getTopGroup());
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Menu test </title>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
</head>
<body>
<form runat="server">
<eo:Menu runat="server" ID="menu1" ClientSideOnLoad="menu_loaded">
<TopGroup>
<Items>
<eo:MenuItem Text-Html="test">
<SubMenu>
<Items>
<eo:MenuItem Text-Html="test">
</eo:MenuItem>
<eo:MenuItem IsSeparator="true">
</eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem Text-Html="test">
</eo:MenuItem>
</Items>
</TopGroup>
</eo:Menu>
</form>
</body>
</html>