Create js for handling edit and delete functionality