Use JS to update active tab