Script.aculo.us Sortable lists, multiple containment, with limits.

D

Daz

Hi guys,

I'm trying to make a script.aculo.us sortable list have a limited
number of elements in it. Now I can check for this really easily and
have a warning message, and of course the php throws an error back
anyway so they can't actually save more than the limit, but, is there
a way I can stop them from dropping the damn thing in the list if it's
full?

I thought about dynamically setting the containment array, so that
only the lists with space were on there, but script.aculo.us does not
seem to want to take a variable instead of the array.

So my next thought was to check onChange whether the item could be
dropped and get it to revert swoosh back over to it's starting point.
But i'm not too sure on how to do this. Any help would be much
appreciated!

Thanks!


Darren.
 
D

Daz

Thanks for that really constructive comment. If you have a better idea
I'd love to hear it.
 
D

David Mark

Thanks for that really constructive comment. If you have a better idea
I'd love to hear it.

Please quote what you are replying to.

As for your original question. It is a waste of time to build
anything on top of Prototype. Scriptaculous (sp?) is built on
Prototype and so was a waste of time for its developers. It doesn't
make sense to waste your time building on top of their mistake.
Realize that this sort of junk code works only in a handful of modern
browsers and is constantly twiddled with to keep up with revised
versions. The same goes for jQuery, Dojo, YUI, etc.

If you feel you really want to build a bloated, unreliable and
inaccessible site, then post your question to a group that deals with
Prototype/Scriptaculous (those groups are full of people with similar
aspirations.) Otherwise, learn JavaScript.
 
V

VK

If you feel you really want to build a bloated, unreliable and
inaccessible site, then post your question to a group that deals with
Prototype/Scriptaculous (those groups are full of people with similar
aspirations.) Otherwise, learn JavaScript.

Such response assumes that you have a much better alternative to
something like:
http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo
in this case you missed to post a code or a URL in your response.

Other regular c.l.j. alternatives if I remember them properly:

1. Don't use any libraries, do anything every time from the scratch.
1-1. If you don't know Javascript good enough then you are busted
because there is not descent online sources to learn it.
1-2. If you don't have time to reinvent the wheel and test it in
different environment then you are an idiot who's wasting everyone's
time here.
1-3. If you have enough time, money and silliness for doing 1-2 then
your solution still will be a sucky suck because no one knows how to
write Javascript properly except a very few of us.
1-4. If you hope to improve your knowledge before doing 1-2 then see
1-1.

2. Javascript can be disabled and even if enabled you are not
guaranteed that you script will work as intended on absolutely all
browsers with script support: ergo Javascript programming is futile by
its very nature.

3. If ones wondering what a hey people - who are giving all these
valuable advises as above - are doing at comp.lang.javascript: this
question alas will remain unanswered because it is a dark mystery for
themselves.

To OP:
Scriptaculous is not a form data validator, it is a complex library.
Most readers here do not have enough of knowledge to properly analyze
its low level structure to answer questions like yours; and a very few
who have - they do not have enough of spare time to do so. Some others
simply refuse to study Scriptaculous because they do not agree with
any coding style other than theirs. So rather than being moved by
points 1, 2, 3 above I would suggest to repost your question at
http://groups.google.com/group/rubyonrails-spinoffs
"Talk about script.aculo.us and Prototype as they fit inside of Rails
and outside."

P.S. Sortable objects expose onChange and onUpdate event handlers so
thoretically one can attach a custom limit check to one of them. Still
a better internal solution can be found.
 
D

David Mark

Such response assumes that you have a much better alternative to
something like:http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo

I certainly do.
in this case you missed to post a code or a URL in your response.

I missed nothing.
Other regular c.l.j. alternatives if I remember them properly:

1. Don't use any libraries, do anything every time from the scratch.

Nobody does everything every time from scratch.
 1-1. If you don't know Javascript good enough then you are busted
because there is not descent online sources to learn it.

Sure there are. This group is one (as long as people skip your
posts.)
 1-2. If you don't have time to reinvent the wheel and test it in
different environment then you are an idiot who's wasting everyone's
time here.

I think it is very clear who the idiot is.
 1-3. If you have enough time, money and silliness for doing 1-2 then
your solution still will be a sucky suck because no one knows how to
write Javascript properly except a very few of us.

Certainly you are not included in that group.
 1-4. If you hope to improve your knowledge before doing 1-2 then see
1-1.

2. Javascript can be disabled and even if enabled you are not
guaranteed that you script will work as intended on absolutely all
browsers with script support: ergo Javascript programming is futile by
its very nature.

Your posts are certainly futile.
3. If ones wondering what a hey people - who are giving all these
valuable advises as above - are doing at comp.lang.javascript: this
question alas will remain unanswered because it is a dark mystery for
themselves.

The only mystery is what you are doing here. You've been told a 10000
times that your opinions are worthless.
To OP:
Scriptaculous is not a form data validator, it is a complex library.

It is a Prototype extension that adds special effects and drag and
drop.
Most readers here do not have enough of knowledge to properly analyze
its low level structure to answer questions like yours; and a very few
who have - they do not have enough of spare time to do so. Some others
simply refuse to study Scriptaculous because they do not agree with
any coding style other than theirs. So rather than being moved by
points 1, 2, 3 above I would suggest to repost your question athttp://groups.google.com/group/rubyonrails-spinoffs
"Talk about script.aculo.us and Prototype as they fit inside of Rails
and outside."

Idiot. One only has to study Prototype to know Scriptaculous (sp?) is
worthless. You can't build anything stable on a swamp.
P.S. Sortable objects expose onChange and onUpdate event handlers so

What are "exposed event handlers?"
thoretically one can attach a custom limit check to one of them. Still
a better internal solution can be found.

Will you please stop posting here.
 
V

VK

I certainly do.

So you are ready to provide a link or post a code? Then why are you
keep wasting time and words? That is your 2nd post here so far and
still not a hint for an alternative solution. Try do not waste your
3rd and last attempt ;-)
 
D

David Mark

So you are ready to provide a link or post a code? Then why are you
keep wasting time and words? That is your 2nd post here so far and

Sorry VK. You will have to learn JavaScript and write your own.
still not a hint for an alternative solution. Try do not waste your
3rd and last attempt ;-)

One available alternative solution for people who are clueless about
browser scripting (e.g. you) is to create designs that are within the
range of their abilities. Then they won't have to hitch their wagons
to fading stars like Prototype. It is interesting to note that the
"sortable" widget was clearly well beyond the range of the Prototype/
Scriptaculous authors as it is sn absolute dog (and infamously buggy.)

Or they can hire people who aren't so clueless. As you mentioned
money as a motivating factor for delegating complex scripting tasks to
million monkey armies, how much do you think it will cost to
constantly monitor and update a site that is based on the output of
such a group? How many customers will you lose each time their code
springs a leak and breaks your pages? Seems like it would be cheaper
to employ competent developers.
 
V

VK

Sorry VK. You will have to learn JavaScript and write your own.

I cannot: it was recently proved that there is not a single descent
online source for that nor a single more-or-less big chunk of code to
learn over it.

Poor me... Poor others... But wait!
One available alternative solution for people who are clueless about
browser scripting (e.g. you) is to create designs that are within the
range of their abilities.

OK. If you are not blessed by David Mark yet then sit with ugly face
on a free template page from Google or Yahoo, don't try to pretend to
be anything near of someone who is as higher of you as the sky higher
of the earth.
Got it, thank you, Masta'.
Then they won't have to hitch their wagons
to fading stars like Prototype.

Of course, Masta'. Stupid usa' will never do dat again.
Let me run back to my Yahoo Free Page barn.
It is interesting to note that the
"sortable" widget was clearly well beyond the range of the Prototype/
Scriptaculous authors as it is sn absolute dog (and infamously buggy.)

It does work though: unlike your imaginary perfect solution that works
so far only in your proud head.
Or they can hire people who aren't so clueless. As you mentioned
money as a motivating factor for delegating complex scripting tasks to
million monkey armies, how much do you think it will cost to
constantly monitor and update a site that is based on the output of
such a group? How many customers will you lose each time their code
springs a leak and breaks your pages? Seems like it would be cheaper
to employ competent developers.

with David Mark in the head. Of course he did not provide a single
worthy line of code yet doing what the customer does need, but it is
enough to read how brave he is in criticizing anything on the market:
that alone suffices to get sure that you are investing into a right
man. Something just tells me that you have lost Daz as a potential
client even for a 10 bucks deal: normally a programmer on sell uses a
bit softer approach ;-)
 
D

David Mark

I cannot: it was recently proved that there is not a single descent
online source for that nor a single more-or-less big chunk of code to
learn over it.

Poor me... Poor others... But wait!

Poor you indeed.
OK. If you are not blessed by David Mark yet then sit with ugly face
on a free template page from Google or Yahoo, don't try to pretend to
be anything near of someone who is as higher of you as the sky higher
of the earth.
Got it, thank you, Masta'.

You are such a moron.
Of course, Masta'. Stupid usa' will never do dat again.
Let me run back to my Yahoo Free Page barn.

See previous comment.
It does work though: unlike your imaginary perfect solution that works
so far only in your proud head.

See previous comment.
with David Mark in the head. Of course he did not provide a single
worthy line of code yet doing what the customer does need, but it is

What customer?
enough to read how brave he is in criticizing anything on the market:
that alone suffices to get sure that you are investing into a right
man. Something just tells me that you have lost Daz as a potential
client even for a 10 bucks deal: normally a programmer on sell uses a
bit softer approach ;-)

What makes you think "Daz" is anything but a would-be JavaScript
developer looking for free advice?

I asked you nicely before. Please stop posting here.
 
V

VK

What makes you think "Daz" is anything but a would-be JavaScript
developer looking for free advice?

So what even if true? It is a Usenet technical group, not a commercial
support desk. People are coming here for free advices and people are
giving advices without expectation to be paid for it.
I asked you nicely before. Please stop posting here.

I asked you nicely and with smiley as well before: stop posting just
to post. RobG post in this thread was rather dry - but fully polite
and containing an _advise_ - URL of a group where the OP question is
better to be posed. Your posts and Thomas' one contained zero useful
information but a bunch of aggression aginst anyone who is not like
you or who doesn't do things as you want. I would even agree - maybe -
on your initial answer like "Go with your stupid Scriptaculous to
": but even this little was not provided. This is what I am
trying to deliver to your head: such style of response is not welcome
in a technical newsgroup and it is particularly not welcome in
comp.lang.javascript which is only two months younger than Javascript
itself, other words is as old as Javascript itself.
 
D

David Mark

So what even if true? It is a Usenet technical group, not a commercial

You were the one who referred to him as your client/customer.
support desk. People are coming here for free advices and people are
giving advices without expectation to be paid for it.

I often give free advice. Just like I did here. I never ask anyone
to pay for anything. You just can't follow the thread and I don't
have time to re-hash it for you.
I asked you nicely and with smiley as well before: stop posting just
to post. RobG post in this thread was rather dry - but fully polite
and containing an _advise_ - URL of a group where the OP question is

I offered the same "advise" (sic) and the URI was already posted.
better to be posed. Your posts and Thomas' one contained zero useful
information but a bunch of aggression aginst anyone who is not like
you or who doesn't do things as you want. I would even agree - maybe -
on your initial answer like "Go with your stupid Scriptaculous to
": but even this little was not provided. This is what I am
trying to deliver to your head: such style of response is not welcome


Deliveries from you are always returned unopened. I don't need any of
your delusions in my head.
in a technical newsgroup and it is particularly not welcome in
comp.lang.javascript which is only two months younger than Javascript
itself, other words is as old as Javascript itself.

Speaking of not welcome. Why can't you take a hint (or 10,000+ and
counting) and post your nonsense elsewhere.[/QUOTE]
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top