ajax button handling for materials and employees