Added js functions for delete and edit