Menu control: Error 0.cells is null or not an object

Rate It (1)

Last post 03-14-2008 4:14 PM by gkanch. 2 replies.

Sort Posts:

  • Menu control: Error 0.cells is null or not an object

    02-26-2007, 9:36 PM
    • Loading...
    • meHere12345
    • Joined on 06-05-2006, 6:09 PM
    • Posts 2
    Getting client side error:
    Error 0.cells is null or not an object

    ASP.NET 2.0 Menu control not auto hiding
    I am using it on a page that has the Multiview & Views controls, but the Menu control is not inside of the Multiview or in View controls. I am not using the Panel controls or Ajax

     I have tried the work-arounds mentioned on

    http://forums.asp.net/thread/1302445.aspx
    http://forums.asp.net/thread/1517884.aspx

    Any suggestions are apprciated.

    In advance, Thanks!

    -Chuck

     

     

    Filed under:
  • Re: Menu control: Error 0.cells is null or not an object

    03-01-2007, 5:01 AM
    Answer

    Hi,

    Can you paste the html source code?

     

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • Re: Menu control: Error 0.cells is null or not an object

    03-14-2008, 4:14 PM
    • Loading...
    • gkanch
    • Joined on 10-25-2006, 12:53 PM
    • Posts 3

    I have the same problem, the menu control is in AJAX Update Panel.  Everytime I hover on the menu item, it gave 0.cells error.  Below is more info about the error.  I put Stick out tongue where the code got stuck.  Thanks !

    Call Stack:

    Menu_HideItems
    Menu_setRoot
    Menu_Expand
    Menu_HoverStatic
    JScript_Form1 anonumous function

    ***********
    Code:

    function Menu_HideItems(items) {

    if (document.body.__oldOnClick) {

    document.body.onclick = document.body.__oldOnClick;

    document.body.__oldOnClick = null;

    }

    Menu_ClearInterval();

    if (!items || ((typeof(items.tagName) == "undefined") && (items instanceof Event))) {

    items = __rootMenuItem;

    }

    var table = items;

    if ((typeof(table) == "undefined") || (table == null) || !table.tagName || (table.tagName.toLowerCase() != "table")) {

    table = WebForm_GetElementByTagName(table, "TABLE");

    }

    if ((typeof(table) == "undefined") || (table == null) || !table.tagName || (table.tagName.toLowerCase() != "table")) {

    return;

    }

    var rows = table.rows ? table.rows : table.firstChild.rows;

    var isVertical = false;

    for (var r = 0; r < rows.length; r++) {

    if (rows[r].id) {

    isVertical = true;

    break;

    }

    }

    var i, child, nextLevel;

    if (isVertical) {

    for(i = 0; i < rows.length; i++) {

    if (rows[i].id) {

    child = WebForm_GetElementById(rows[i].id + "Items");

    if (child) {

    Menu_HideItems(child);

    }

    }

    else if (rows[i].cells[0]) {

    nextLevel = WebForm_GetElementByTagName(rows[i].cells[0], "TABLE");

    if (nextLevel) {

    Menu_HideItems(nextLevel);

    }

    }

    }

    }

    else {

    Stick out tongue for(i = 0; i < rows[0].cells.length; i++) {

    if (rows[0].cells[i].id) {

    child = WebForm_GetElementById(rows[0].cells[i].id + "Items");

    if (child) {

    Menu_HideItems(child);

    }

    }

    else {

    nextLevel = WebForm_GetElementByTagName(rows[0].cells[i], "TABLE");

    if (nextLevel) {

    Menu_HideItems(rows[0].cells[i].firstChild);

    }

    }

    }

    }

    if (items && items.id) {

    PopOut_Hide(items.id);

    }

    }

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter