Fixed bug in IE Treeview Webcontrol when clicking on leaf node.

Discussion in 'ASP .Net Web Controls' started by William Main, Feb 1, 2005.

  1. William Main

    William Main Guest

    When I clicked on a leaf node in the treeview control I would sometimes get
    an error message "tabName is null or not an object". The error was being
    produced by the treeview.htc client side script at line 209 (version 1.0).

    if (textnode.tagName.toLowerCase() == "treenode")

    It turns out that the object textnode was null in these instances. To fix
    this I added a test for null.

    function HoverNode(textnode)
    {
    var node;
    //Bug - Jan 1 2005 WRM Clicking on leaf would result in error "tagName is
    null or not an object".
    // Added test for textnode != null
    if (textnode != null)
    {
    if (textnode.tagName.toLowerCase() == "treenode")
    node = textnode.subtree.all.item("_tntext", 0);
    else
    node = textnode;

    The treeview.htc file is found in the C:\Inetpub\wwwroot\webctrl_client\1_0
    folder.

    Hopefully this will help others and eventually find it's way into the next
    release.
    --
    Thanks for all you do

    Virtually yours,
    William Main
    William Main, Feb 1, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,400
  2. mazdotnet
    Replies:
    1
    Views:
    7,597
    mazdotnet
    Aug 1, 2006
  3. Replies:
    7
    Views:
    863
  4. Bret

    Force postback from Treeview leaf node

    Bret, Jun 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    358
  5. Replies:
    0
    Views:
    363
Loading...

Share This Page