Why am I experiencing trouble embedding a form using javascript?