writeDialog with jquery-ui and form.submit handler