updates javascript for form page