Added function to show alerts if alert is present in P tag