function activateUpdateBudgetEvent(){

                    $("#form-update-"+budgetId).submit(function(e){
                        e.preventDefault();
                        ajax.send("Budget/update", helpers.serialize("#form-update-"+budgetId, "budget_id="+budgetId), updateBudgetCallBack);

                        function updateBudgetCallBack(result){
                            if(helpers.validateData(result, budgetBody, "after", "default", "data")){
                                $(budgetBody).after(result.data);
                                $(budgetBody).remove();
                                events.budget.reInit();
                            }
                        }
                    });
                }
// 3. if update, then update the current budgets and get back the updated one
3. if update, then update the current budgets and get back the updated one
3 . if update then update the current budgets and get back the updated one
function activateUpdateBudgetEvent(){
                    $("#form-update-"+budgetId).submit(function(e){
                        e.preventDefault();
                        ajax.send("Budget/update", helpers.serialize("#form-update-"+budgetId, "budget_id="+budgetId), updateBudgetCallBack);
                        function updateBudgetCallBack(result){
                            if(helpers.validateData(result, budgetBody, "after", "default", "data")){
                                $(budgetBody).after(result.data);
                                $(budgetBody).remove();
                                events.budget.reInit();
                            }
                        }
                    });
                }
function activateUpdateBudgetEvent ( ) { $ ( "#form-update-" + budgetId ) . submit ( function ( e ) { e . preventDefault ( ) ; ajax . send ( "Budget/update" , helpers . serialize ( "#form-update-" + budgetId , "budget_id=" + budgetId ) , updateBudgetCallBack ) ; function updateBudgetCallBack ( result ) { if ( helpers . validateData ( result , budgetBody , "after" , "default" , "data" ) ) { $ ( budgetBody ) . after ( result . data ) ; $ ( budgetBody ) . remove ( ) ; events . budget . reInit ( ) ; } } } ) ; }
3. if update, then update the current budgets and get back the updated one
3 . if update then update the current budgets and get back the updated one