modify logic of closing popup table to only using javascript