refactoring ajax attribute for popups