[ADDED] [V1.0] AjaxMethods addition

  1. #1

    [ADDED] [V1.0] AjaxMethods addition

    I would like to see a param that is able to run after a success or failure when the method returns. Kinda works like a finally of a try...catch.

    Example:

    Coolite.AjaxMethods.DoSomethingCool(param, param, {
        success: function(result) {
            // TODO do something
        },
        failure: function(result) {
            // TODO do something
        },
        finally: function(result) {
            // TODO: this runs AFTER the success or failure fires.. kind of a clean up type thing, or do some common
            // function after the succes or failure runs
        }
    });
  2. #2

    RE: [ADDED] [V1.0] AjaxMethods addition

    I agree! I usually show a loadmask before firing off an AjaxMethod. Currently, I have hide the loadmask in the success AND failure handler.
  3. #3

    RE: [ADDED] [V1.0] AjaxMethods addition



    Yeah. Exactly why I want it.

    I have several timers running on my application. I stop the timers so that long database process don't cause a bunch of queued requests doing basically the same thing.

    After a success or failure, I hide a mask and restart the timers. I have to do this pretty much for every success/failure.

    This would help with code size reduction and to make sure that things run in the order you want them.

    Thanks.
  4. #4

    RE: [ADDED] [V1.0] AjaxMethods addition

    Ya, I like this idea as well and ran into a scenario the other day where this would have been helpful.

    Geoffrey McGill
    Founder
  5. #5

    RE: [ADDED] [V1.0] AjaxMethods addition

    Hi,

    This feature (called Complete) is implemented and will be available in 1.0 release. Applies for ajax events and ajax methods
  6. #6

    RE: [ADDED] [V1.0] AjaxMethods addition



    Oh, nice!

    Thanks.

Similar Threads

  1. Replies: 12
    Last Post: Jun 04, 2012, 11:18 AM
  2. Replies: 1
    Last Post: Dec 21, 2010, 10:28 AM
  3. AjaxMethods
    By flaviodamaia in forum 1.x Help
    Replies: 4
    Last Post: Mar 10, 2009, 2:08 PM
  4. Confirm with AjaxMethods
    By afhi in forum 1.x Help
    Replies: 1
    Last Post: Jan 20, 2009, 12:27 PM
  5. AjaxMethods
    By Rod in forum Open Discussions
    Replies: 4
    Last Post: Dec 25, 2008, 11:53 AM

Posting Permissions