Hey everyone,
I have some attribute values that are declared and set in my Web.Config file in a .Net application. I set two attributes to either ="true" or ="false" but when accessed via javascript the values are the opposite. Here is one line of the Web.Config;
Code:
<menu id="NavClientAccess" href="javascript:__doPostBack('GoClientReport','');" jumpToClick="return canJumpToPostback('#NavClientAccess')" onClick="return allowSubMenuPostback(this);" SubMenu="true" SubItem="false" title="Investor360" jumpto="true" accessLevel="Reps"></menu>
But when accessed within this JS loop; the value of SubMenu="false" and the value of SubItem="true";

Code:
function BuildJumpToMenu(menuTabs) {
    var divJumpTo = $('div[id$="divJumpTo"]');

    if (menuTabs.length > 0) {
        for (var iTabIndex = 0, iTabLength = menuTabs.length; iTabIndex < iTabLength; iTabIndex++) {
            var divMenu = $('<div></div>');
            var icon = "";

            divMenu.attr('class', 'menu-group');
            divMenu.attr('id', 'div' + menuTabs[iTabIndex].Title.replace(' ', ''));

            icon = "<img src='" + menuTabs[iTabIndex].JumpToIcon + "' class='jumpToIcon'/>";
            divMenu.append(icon);
            divMenu.append(BuildMenuItem(menuTabs[iTabIndex].ID, menuTabs[iTabIndex].Title, menuTabs[iTabIndex].HRef, menuTabs[iTabIndex].JumpToClick, 'group-title'));

            if (menuTabs[iTabIndex].MenuTabItems.length > 0) {
                var subItems = menuTabs[iTabIndex].MenuTabItems;
                for (var iItemIndex = 0, iTtemLength = subItems.length; iItemIndex < iTtemLength; iItemIndex++) {
                        if (subItems[iItemIndex].SubMenu == "true") {
                            divMenu.append(BuildMenuItem(subItems[iItemIndex].ID, subItems[iItemIndex].Title, subItems[iItemIndex].HRef, subItems[iItemIndex].JumpToClick, 'submenu'));
                        }
                        else if (subItems[iItemIndex].SubItem == "true") {
                            divMenu.append(BuildMenuItem(subItems[iItemIndex].ID, subItems[iItemIndex].Title, subItems[iItemIndex].HRef, subItems[iItemIndex].JumpToClick, 'submenu-item'));
                        }
                        else{
                            divMenu.append(BuildMenuItem(subItems[iItemIndex].ID, subItems[iItemIndex].Title, subItems[iItemIndex].HRef, subItems[iItemIndex].JumpToClick, 'menu-item'));
                        }
                }
            }
            divJumpTo.append(divMenu);
        }
    }
}
Once I get into the If elseif else statement the values are always opposite for only the SubMenu and SubItem variables, other than that everything is completely correct.
Any help is greatly appreciated.
thank you,
NickG