writing ean to html instead of alert