Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  How to work on DNNTree client side via javascript?
Previous Previous
 
Next Next
New Post 7/13/2008 6:15 PM
User is offline Brent Yao
11 posts
10th Ranked


How to work on DNNTree client side via javascript? 

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 7:05 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: How to work on DNNTree client side via javascript? 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  How to work on DNNTree client side via javascript?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP