Changed alert from element to attribute