attendace with ajax implemented but not working