Click to See Complete Forum and Search --> : Repopulate listbox when popup closes


babs
07-10-2003, 03:13 AM
Hi,

On my web page I have a drop down list of "Units Types"
The list is coded in html, and populated from a vbscript recordset. The recordset is populated via a query from a table called tblUnits. (see code below)

On the web page there is a clickable icon which opens another "popup" webpage. The popup allows me to add a new Unit type to tblUnits. When I close the popup, I want the newly added units to appear in the dropdown list on the calling page

Does anyone know how I can achieve this? I would like to do this in Javascript if possible, as it is a Javascript funtion which is called when the popup is closed.

Thanks for your help!!! :)

Barbara

<select name="n_unit_type_<%=rowCount%>" >
<option value="">Select...</option>
<%While Not rstunittypes.EOF%>
<option value="<%=rstunittypes("n_unit_type")%>">
<%=rstunittypes("c_description")%>
</option>
<%rstunittypes.MoveNext

Wend%>

Khalid Ali
07-10-2003, 08:31 AM
Take a look at the links below,one will demonstrate how to add listbox options dynamically and the other displays communication betweenparent and child pages

http://68.145.35.86/skills/javascripts/CreateDynamicListBox.html
http://68.145.35.86/skills/javascripts/ParentWinInteractionWithChildWin.html

Its extremely simple to merge both scripts together to what you desire