set the active status when swtiching docs.