change display method from alert to div