This question is locked. New answers and comments are not allowed.
I have a TreeView with a properties pane for editing related properties of the currently selected node. I'm doing an AJAX POST to update the properties of the selected node including the description which is the text of the selected node. When my OnSuccess callback function is called I update the node's text with the new description. The problem is when I update the text like the following it wipes out the image.
So to get around this I first copy the outer HTML of the image, append the new description and reinsert the HTML to the span element. Unless I'm missing something to make this simpler why isn't there a separate element for the text to make it easier to update?
I also noticed that the image's HTML doesn't have a closing tag as well as the hidden input that holds the node's value.
$(node).find("> div > .t-in").text(data.Description);So to get around this I first copy the outer HTML of the image, append the new description and reinsert the HTML to the span element. Unless I'm missing something to make this simpler why isn't there a separate element for the text to make it easier to update?
I also noticed that the image's HTML doesn't have a closing tag as well as the hidden input that holds the node's value.