connecting jquery dialog to trial design backend