using switch in controller,add one more ajax submit