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

W

William Main

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top