How to Update Select (Drop down) box

They have: 39 posts

Joined: Jun 2000

IS it possible to update select box in the parent window from a pop up window?

Thanks for your help!

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

By update, if you mean add or remove options, the answer is yes. Selection lists are simply arrays. You can add to them, truncate them, and change individual cells (options). To do it from a popUp, you would need to use the opener property.

opener.document.formname.selName.option[x].text = someVar; opener.document.formname.selName.option[x].value = someVar;

if you would like to see how to addof options, check the selection list scripts at my site. The scripts include dynamic creation, reordering, and cascading. Each comes with a full explanation.

Vinny

------------------
my site:GrassBlade: cut&paste javascript
moderator at:The Javascript Place
Javascript City

Where the world once stood
the blades of grass cut me still

They have: 39 posts

Joined: Jun 2000

I am trying to add new option and I am getting this error meesage:

"The server threw an exception"

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.