Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIHow to work on DNNTree client side via javascript?How to work on DNNTree client side via javascript?
Previous
 
Next
New Post
7/13/2008 8:15 PM
 

How can I implement a feature like moving a node in a DNNTree on client side through javascript?

For example, if a parent node has three child nodes 1, 2 and 3 in order, I want to move node 3 to be ahead of node 2 (and of course directly follow the node 1). How can i do that in javascript? For the testing purpose, I can put a button on the page. When I click the button, the node 3 should be moved to be ahead of node 2, all happening on client side in javascript without the page postback. I know there is a javascript function insertBefore, but I couldn't figure out how to make it work. I tried something like
dnn.controls.controls['MyDNNTree'].DOM.childNodes(0).childNodes(0).node.childNodes[0].insertBefore(new dnn.xml.XmlNode(node2), new dnn.xml.XmlNode(node1));
and it won't work. Can somebody help me out here?

I know I can implement adding/deleting nodes on server side. What I want to do is to let user manipulate the nodes (adding/deleting/moving) on client side, and finally postback all the changes to server. I read through the document "DotNetNuke Client API Client Callback.pdf" but don't find the answers.

And besides that, does DNN have the feature to drag and drop a DNNTree node to a new position? If it does, can somebody show me how to do that in some sample codes (again, all on client side in javascript)?

Thanks very much!

Brent

 
New Post
7/15/2008 9:05 AM
 

The current implementation of the tree only allows for the dynamic adding of nodes on the client (as in the case of populate on demand).  While theoretically what you are trying to do can work, I am not recommending it, as the hooking in of the event handlers needs to be done correctly or you will have memory leaks.  Having the ability to do node manipulation (swap, remove, append) is definitely something I am aiming to support with a nice api in the future, its just not there yet (and is not in the next version of the controls soon to be released either).


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIHow to work on DNNTree client side via javascript?How to work on DNNTree client side via javascript?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out