Hi Rolf,
you may like to seperate events and function
http://jsfiddle.net/g508zvq4/1/ and/or use a more structured way for
your code http://jsfiddle.net/g508zvq4/3/. Creating a meta request
object which handles every possible action might get too complicated.
Aicke
Am 17.01.2015 um 09:50 schrieb 'Roo' via MooTools Users:
Hi Sérgio
Here is a little JS Fiddle;
http://jsfiddle.net/g508zvq4/
This does no useful work but it illustrates the pattern. In this
fiddle there are three possible actions that result in AJAX/Request
calls which all do basically the same thing...do some database work
then update the UI either by removing, adding or altering something.
In the real life cases I may have as many as 15 different actions
possible on the page so I have 15 near (but not) identical chunks of
JS code.
Thanks
Rolf
--
---
You received this message because you are subscribed to the Google
Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.