Copy link to clipboard
Copied
I have a form with a cfselect generating a dropdown of Program Directors. I have a link near the dropdown to a page for adding Program Directors.
I want to be able to click the link, add a Program Director, then have the cfselect-generated dropdown in the form show the current list of Program Directors (including the one just added).
How can get the list of Program Directors in the dropdown show the new list of Program Directors without having to refresh the form (thus losing information already entered into the form)?
Thx
Copy link to clipboard
Copied
google "javascript add option to select"
Copy link to clipboard
Copied
The user will know the name of the Program Director, but will not know the ID field for record just inserted into the database for the Program Director. The ID will be submitted in the form submittal.
Is it possible to get the cfc to fire again, updating the ID / Program Director Name info in the dropdown?
Copy link to clipboard
Copied
Thx for the quick response, Dan!
My problem is not just needing to add to the dropdown the Program Director's name, but adding the ID / Name in the dropdown, where the user sees the Name but submits the ID when the form is submitted. And the user will not know the ID of the newly-added Program Director.
That is why I was hoping I could refresh the contents of the dropdown with the new ID / Name combination.
kentwva
(Alan) Kent Klemm (contractor)
Web Developer
National Human Genome Research Institute
E-mail: klemma@mail.nih.gov
Phone: (301) 451-8328
Copy link to clipboard
Copied
google "javascript pass to parent"