locked
expand/collapse table with properties in classic library RRS feed

  • Question

  • sample: http://msdn.microsoft.com/en-us/library/ms535893(VS.85).aspx#
    script: mtps-bn20101004.js

    Can you fix JavaScript function "ToggleMutliViewTable(strImage)" for compatibility with new browsers?

    solution:
     add one more if "if (thisPanelOb.parentNode.childNodes[i].style)" before "if(thisPanelOb.parentNode.childNodes[i].style.height=="300px")" with its "else"

    explanation: childNodes contain textNodes, which don't has property "style" => new browsers output error "Cannot convert to object".

    thanks.

    Thursday, October 21, 2010 12:54 PM