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

Discussion in 'Javascript' started by Daz, Jan 12, 2008.

  1. Daz

    Daz Guest

    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.
     
    Daz, Jan 12, 2008
    #1
    1. Advertising

  2. Daz wrote:
    > I'm trying to make a script.aculo.us sortable list [...]


    My sincere condolences.


    PointedEars
    --
    Use any version of Microsoft Frontpage to create your site.
    (This won't prevent people from viewing your source, but no one
    will want to steal it.)
    -- from <http://www.vortex-webdesign.com/help/hidesource.htm>
     
    Thomas 'PointedEars' Lahn, Jan 12, 2008
    #2
    1. Advertising

  3. Daz

    Daz Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    Thanks for that really constructive comment. If you have a better idea
    I'd love to hear it.
     
    Daz, Jan 13, 2008
    #3
  4. Daz

    RobG Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 9:12 am, Daz <> wrote:
    > Hi guys,
    >
    > I'm trying to make a script.aculo.us sortable list...


    Ask in a group that's interested in the scriptaculous.js library, this
    group isn't.

    <URL: http://groups.google.com.au/group/rubyonrails-spinoffs?hl=en&lnk=li
    >



    --
    Rob
     
    RobG, Jan 13, 2008
    #4
  5. Daz

    David Mark Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 6:32 am, Daz <> wrote:
    > 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.
     
    David Mark, Jan 13, 2008
    #5
  6. Daz

    VK Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 3:44 pm, David Mark <> wrote:
    > 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.
     
    VK, Jan 13, 2008
    #6
  7. Daz

    David Mark Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 10:02 am, VK <> wrote:
    > On Jan 13, 3:44 pm, David Mark <> wrote:
    >
    > > 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


    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.
     
    David Mark, Jan 13, 2008
    #7
  8. Daz

    VK Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 9:47 pm, David Mark <> wrote:
    > > > 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

    >
    > 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 ;-)
     
    VK, Jan 13, 2008
    #8
  9. Daz

    David Mark Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 1:56 pm, VK <> wrote:
    > On Jan 13, 9:47 pm, David Mark <> wrote:
    >
    > > > > 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

    >
    > > 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


    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.
     
    David Mark, Jan 13, 2008
    #9
  10. Daz

    VK Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 11:52 pm, David Mark <> wrote:
    > 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 ;-)
     
    VK, Jan 13, 2008
    #10
  11. Daz

    David Mark Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 4:25 pm, VK <> wrote:
    > On Jan 13, 11:52 pm, David Mark <> wrote:
    >
    > > 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!


    Poor you indeed.

    >
    > > 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'.


    You are such a moron.

    >
    > > 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.


    See previous comment.

    >
    > > 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.


    See previous comment.

    >
    > > 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


    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.
     
    David Mark, Jan 13, 2008
    #11
  12. Daz

    VK Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 14, 12:31 am, David Mark <> wrote:

    > 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 pro..., other words is as old as Javascript itself.
     
    VK, Jan 13, 2008
    #12
  13. Daz

    David Mark Guest

    Re: Script.aculo.us Sortable lists, multiple containment, withlimits.

    On Jan 13, 5:05 pm, VK <> wrote:
    > On Jan 14, 12:31 am, David Mark <> wrote:
    >
    > > 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


    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 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


    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 pro...d counting) and post your nonsense elsewhere.
     
    David Mark, Jan 13, 2008
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    369
  2. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    409
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  3. Replies:
    2
    Views:
    365
  4. Toby Inkster

    Script.aculo.us effect not working in Firefox?

    Toby Inkster, Jan 22, 2007, in forum: Javascript
    Replies:
    5
    Views:
    91
    Toby Inkster
    Jan 24, 2007
  5. hedgehog
    Replies:
    1
    Views:
    145
    hedgehog
    Apr 6, 2007
Loading...

Share This Page