Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh drop down list to add a newly created item without reloadg pag

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Hi,

I have already read the following FAQs : FAQ333-1498
FAQ333-3656 about updating drop down lists.
I have a drop down list with team leaders names in a form and a link next to it to a "Create a new leader" pop-up page.
I just want to be able to refresh the team leaders list once a new one has been created without reloading the form.
(by clicking on a button ...)
The javascript array method doesn't apply here since it consists of adding a new item.

Thanks in advance for your help.




blygman@hotmail.com

François
 
You can create a new javascript function in your parent page to accept two arguments then use those two arguments as the value and text for a new option, adding it to the correct dropdown similar to how it was done in the FAQs.
Your child form would do it's submit and then in the onLoad in your body tag in the second page for the child do a call to the parent windows new function. That way you can pass back the info from the child window right after it is added to the database and it will be used in the function to be aded to the listbox (or whatever you need to put it in).

-T

[sub]01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111[/sub]
The never-completed website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top