new post - generating HTML with javascript