Skip to main content

Posts

Showing posts with the label dhtml

Vertical and horizontal drag/drop node tree

I was recently experimenting with a html tree which can manipulate it's nodes by drag and drop. I wanted to make it horizontally and vertically growable. When I was almost done, I had to rush for a much simpler version of this without the drag/drop part. I think the code I have written so far might be a good starting point to someone who is trying to do the same thing. Download Code The above code use script.aculo.us Prototype and YUI javascript libraries together. Now I am realizing that, using YUI alone might be a better solution for this since YUI also comes with the drag/drop support.

Projecting HTML Elements on a circle using Javascript

Recently I wonted to create a tree control with a different approach. The requirement was to represent a node tree with main node on the circle center and it's child nodes projected on a circle around it. This is what i wanted. My solution has 5 files prototype.js This is a handy javascript framework. You can download the latest version from there website ( www.prototypejs.org/download ). I am using this to simply handle the onload event in the page. circle.html script.js node-main-left.gif node-sub-left.gif The circle.html, prototype.js and the script.js files are in the root folder and the two images are inside a folder named “images”. This is how the html file looks(circle.html). <html> <head> <script src="prototype.js" type="text/javascript"></script> <script src="script.js" type="text/javascript"></script> <script language="javascript" xml:space...