javascript variable rendering helper in one place in html