...

View Full Version : Multiple Use Select List



ggallen
10-17-2003, 05:10 PM
I need to use a Select List of Options (same options) about
10 or 20 times in a page, and there could be quite a lengthy
list of options.

Rather than populate each List on loading, I figured I'd populate
one internal list in javascript as a base, then and create a blank
Select List in HTML. When each List is selected for use, I wanted
to have a javascript routine, move the contents of the internal
list to the this previously blank list, then do the selection, and on
blur clear out the list, except for the selected item (optional).

Is there an easy way to move an entire content of a select
list to another, without looping through and adding each
individually?

Thanks
George

Danne
10-17-2003, 11:45 PM
If I understood you corrrectly:


newContainer.innerHTML = baseContainer.innerHTML;


But this way you will replace the whole <select>.

glenngv
10-18-2003, 04:43 PM
If you implement that, when the user clicks in and out of the combobox, there would be a delay when populating and deleting the items in the list. That could be a little annoying to the user.

What you can do is put the combobox in a different page. Then in the main page, have a button that will open the combobox page and when an item is selected, a field in the main page will be set with that item value.

ggallen
10-20-2003, 03:50 PM
I thought about using another page for input, but given
the orignal page layout, it would be worse than a delay.

I'll give the inner html reference a shot and see how it
works.

ggallen
10-20-2003, 03:56 PM
I thought about using another page for input, but given
the orignal page layout, it would be worse than a delay.

I'll give the inner html reference a shot and see how it
works.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum