Updated destroy js file to update page