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!

Populationg drop down in Parent with values from popup Window.

Status
Not open for further replies.

rudy23

Programmer
Feb 12, 2004
31
US
Dunno how complex this is gonna be. Hers what I have right now. Window A is the Parent window. After I make a selection in it from a dropdown it opens a popup window which has another dropdown menu populated with some data from the database. When a user selects an option from the popup it gets populated in a new text box in the parent window. I manged to do this. However I cant imagine how to pass all values to the parent and populate them in a new select box.

Example: user selects State from dropdown in parent window. After checking in the databse Popup window opens showing 4 states in dropdown NY, CT, NJ TX. User selects NY the popup closes and a new select box appears in main window with all 4 states available and NY selected as default.

Note: The values for state are not available when the page loads. They must be passed from the popup window.

Any help and sample code greatly appreciated.
 
Thats a good one, but heres some ideas.

in popup, sorry vbscript
Code:
<script language="vbscript"> 
dim DROPBOX, userSelect
DROPBOX = document.all("DROPDOWN_MENU").options;
for each OPT in DROPBOX
pass OPT.name to the parent DROPDOWN_MENU
next
if (OPT.option("OPT1").select() = true) then
set userSelect = OPT.option("OPT1")
elseif (OPT.option("OPT2").select() = true) then 
set userSelect = OPT.option("OPT2")
else 
Endif
rember just ideas, i need to see you code to really know, what to code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top