add basic javascript for form control