Improved js validate,save_and_calc,only_calc funcs