When I recently used Treeview, I found a strange problem.
Tree control is normal when nodes are added, deleted, or modified. However, when I move one node to another parent node, Treeview. HTC reported that the tagname is empty or not an object.
LookCodeI didn't find anything wrong. I don't know why.Try alert () and find that the number of prompts is too large to locate the error.
I am not very familiar with JS, so I want to judge the condition that is null.In row 210th of Treeview. HTC, I added the tagname judgment. The Code is as follows:
// If you don't judge whether it is null, it will report error when you move a node from its parent to another
// Add By SWL on
If (textnode. tagname. value! = NULL ){
...
}
A simple line of code actually solved my problem. Although I don't know if this change is appropriate, there is no problem with Treeview. I think it is okay for the time being.
If you know what is wrong, please reply to me
I am very grateful...