views:

710

answers:

1

A parent page contains a tree (Jquery TreeView), users can add a node using a pop-up, a pop-up has to connect to the database and retrieve some data and return it upon closing (at this point it is a .net server-side page). After this I have to add a node(or several) to the TreeView.

question: upon a pop-up close, how do trigger the adding a node to jquery TreeView?

I have asked this question here 10 times and no one answers it clearly.

+1  A: 

That nobody answers you maybe should get you thinking.

After reading this and some of your previous questions I can tell you that you just don't provide enough information to get anybody interested to look at your problem.

No code sample. No precise description. No listing of what you tried and what failed or how it failed and so on.

But basically all you need is already shown on the jQuery Treeview demopage. Check the source and notice how the Add! button works.

Excerpt from demo.js

var newnodes = $("<li><span class='folder'>New Sublist</span><ul>" +
    "<li><span class='file'>Item1</span></li>" +
    "<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser");
$("#browser").treeview({
  add: newnodes
});
jitter
thanks, my question had more to do with ajax side. I haven't started coding yet, I am looking at the alternatives and wanted to seek advise from people who have had this experience before to save myself some time.As far as the detail goes - this is in a nutshell what happens (body of the question)
gnomixa
"branches" in your add statement is supposed to be "newnodes" in your example code.
mkmurray
thx fixed the typo
jitter