Can anyone recommend a JavaScript Tree with drag and dropfunctionality?

G

Gregor Kofler

Jorge meinte:
I fully understand the way my toaster works, my freezer, the washing
machine, a Scotch Brite®™, a bicycle, even my car, a C compiler, a
truetype font, a JS minifier, a JSON parser, a code128 barcode, the
gzip algorithm, base64 encoding, an http server, a serial port, a
digital clock, a keyboard, a microprocessor, a switching-mode DC power
supply... etc.(*)

I know how nuclear fission or fusion works - yet don't have my own small
reactor at home, since I lack some tools needed.

I do have a text editor and browser, though.
So what ???

....are you trying to "prove"?

Gregor
 
T

Thomas 'PointedEars' Lahn

Scott said:
David said:

In the days of yore, as you have perhaps heard, video data was not
streamed across networks, but encapsulated on shimmering discs,
called, if legend is correct, deeveedees. But there are stories that
in the days of the Old Gods, before the coming of the DeeVeeDee, video
was available on a sequential access machine featuring spinning
spindles and a lodestone. It is said that these veeceeare machines
could record video transmitted magically through the air, but only the
wisest of sorcerers knew how to instruct these machines. These
sorcerers were known as "geeks", an honorific that survives this day.
[...]
____________________
[1] Don't you love the word fAcEtIOUs, with all the vowels in
order? :)

YMMD :)

BTW, there is de.alt.netdigest where funny replies like that can be
submitted to for posterity. Is there such a newsgroup in the Big 8, or is
there such an English-speaking newsgroup, too? If yes, what is its name?
TIA.


PointedEars
 
S

Scott Sauyet

BTW, there is de.alt.netdigest where funny replies like that can be
submitted to for posterity. Is there such a newsgroup in the Big 8, or is
there such an English-speaking newsgroup, too? If yes, what is its name?

There probably is one, but I don't know any details. Sorry.

Glad you liked it,

-- Scott
 
T

Thomas 'PointedEars' Lahn

Jake said:
de.alt.netdigest's FAQ mentions alt.humor.best-of-usenet

Ah, I usually have that FAQ posting hidden behind a filter so it doesn't get
in the way. Fortunately, my news server has the alt.* group. So it's not
in the Big 8, but at least English-speaking. Thank you very much.


PointedEars
 
T

Thomas 'PointedEars' Lahn

mscir said:
http://www.dhtmlgoodies.com/scripts/drag-drop-folder-tree/drag-drop
folder-tree.html

This one works in my XP browsers:
IE 8
Firefox 3.6
Opera 10
Safari 4.0.4

That does not mean anything, particularly as you have only tested with one
operating system on one platform.
Why I thought it was good enough to post here was: it's free,

True, it is free software (GPL v2.1+ licensed), and it can be downloaded
for free. However, free advice is seldom cheap. That goes especially for
scripts downloadable from self-proclaimed portal sites like
dhtmlgoodies.com.
it works at least some of the time -

If that is a sufficient criterion for you for good software quality, you
should better stop developing (and recommending) software.
even in late version browsers, and the OP can start learning about how
it's done by downloading the code

No, they won't.
and seeing which browsers break it. If he run into problems he can post
about the problems here and learn more javascript, or learn enough to
recognize better written examples of drag and drop when he does further
research.

Having to unlearn a load of utter nonsense beforehand.
So I thought this was a good recommendation, since he didn't specify
stringent requirements.

But it was not. In fact, given the lack of specific requirements, the
requirements are even greater for a distributed application like this,
because it must not break even when exposed to yet unknown environments.

The problem with scripts poorly written such as this is that the OP is not
going to find any problems with it (like you) until it is too late, but
their users most certainly will. Starting with, ISTM, the users that do
not have sufficient client-side script support available as the markup it
is based on goes like this:

<ul>
<li id="node2" noDelete="true"><a href="#">Norway</a>
<ul>
<li id="node3" noRename="true"><a href="#">Stavanger</a></li>
<li id="node6"><a href="#">Bergen</a></li>
<li id="node7"><a href="#">Oslo</a></li>
</ul>
</li>
...

Search engines will find something to index, but nothing to follow here,
too. Great idea. NOT.

And they even dare declare this junk HTML 4.01 (Strict). This script is --
literally -- not worth one bit of the about 44 KiB it requires to "work".
And that is only a rough estimate.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Thomas said:
[...]
The problem with scripts poorly written such as this is that the OP is
not going to find any problems with it (like you) until it is too late,
but their users most certainly will. Starting with, ISTM, the users that
do not have sufficient client-side script support available as the markup
it is based on goes like this:

<ul>
<li id="node2" noDelete="true"><a href="#">Norway</a>
<ul>
<li id="node3" noRename="true"><a href="#">Stavanger</a></li>
<li id="node6"><a href="#">Bergen</a></li>
<li id="node7"><a href="#">Oslo</a></li>
</ul>
</li>
...

Search engines will find something to index, but nothing to follow here,
too. Great idea. NOT.

OK, after digging through most of the script code it does not appear as if
this collection of scripts would set `click' listeners dynamically, like so
many others, so I can accept this as (poor) example code. (But would the
OP have recognized this?)

However, the scripts are based on invalid markup, they augment host objects
and use setAttribute() to create invalid attributes on which values they
rely, for which they should be dumped already. And then there are bogus
feature tests like `if (document.all) e = event;', mentioning of classes in
a prototype-based language, and too many globals (some of them undeclared),
to name a few more mistakes.
And they even dare declare this junk HTML 4.01 (Strict). This script is
-- literally -- not worth one bit of the about 44 KiB it requires to
"work". And that is only a rough estimate.

So I stand by my initial recommendation: Do not use these scripts.


PointedEars
 
L

Laser Lips

As long as my English is better than your Dutch,
you should not complain in this international NG, methinks.
Evertjan.

Sorry Evertjan, was just being Pedantic.

Well, I managed to create my own script which has drag and drop as
well as rules you can set for nodes which can and can't be dragged on
certain parents. Also has the ability to reorder leaf nodes.

Yes, I did learn that to make a good tree script. It's logical to use
nested unordered lists.

Graham
 
S

Scott Sauyet

Well, I managed to create my own script which has drag and drop as
well as rules you can set for nodes which can and can't be dragged on
certain parents.  Also has the ability to reorder leaf nodes.

Yes, I did learn that to make a good tree script. It's logical to use
nested unordered lists.

Congratulations! Is it something you're willing to share with the
group? Feedback here can occasionally be harsh, but might be
instructive.

-- Scott
 
E

Evertjan.

Laser Lips wrote on 18 feb 2010 in comp.lang.javascript:
Sorry Evertjan, was just being Pedantic.

Wel taken. What is a NG without emotions?
Well, I managed to create my own script which has drag and drop as
well as rules you can set for nodes which can and can't be dragged on
certain parents. Also has the ability to reorder leaf nodes.

Yes, I did learn that to make a good tree script. It's logical to use
nested unordered lists.

Hopefully you will be able to expand it in a year or two without having to
secandguess your present programming ideas. [My probelm at present]

In any case it is much easier than the hidden ideas of a third [second?]
party.
 
L

Laser Lips

Feedback here can occasionally be harsh, but might be instructive.

That's putting it mildly.

Yes I will share. I'll post a link soon. I've built it as part of a
system so will need to package up the scripts so I can dump it on a
server.

Graham
 
L

Laser Lips

Hopefully you will be able to expand it in a year or two without having to
secandguess your present programming ideas. [My probelm at present]

Do you mean go over my code and try to work out what the hell I was
writting? Yes have that often. Just proves I'm a bad programmer.

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top