Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: List box Transfer


Message #1 by "John Sheehan" <John.Sheehanfmr@f...> on Tue, 7 May 2002 17:23:59
I need to figure out how to pass multiple options between a double selection/list box.
I can only get one option to transfer with the next transfer overwriting the original. Any 
ideas??? The function code im using is below

function addtocombo()
                {
                                var i = 0
                                var selectedItem
                                var selectedText
                                var selectedValue
                                var newoption1
                
                                for (counter = 0; counter < userslist.menuitems.length; counter++)
                                {
                                                if (userslist.menuitems.options(counter).selected == 1)
                                                {
                                                 selectedItem = document.userslist.menuitems.selectedIndex; 
                                                 
                                                 selectedText = 
document.userslist.menuitems.options[counter].text;
                                                 
                                                 selectedValue = 
document.userslist.menuitems.options[counter].value;
                                                 
                                                 newoption1 = new Option(selectedText, selectedValue, false, 
false);
                                                 
                                                 document.userslist.selitems.options[i] = newoption1;
                                                 
                                                 i = i + 1
                                        }
                                }
                
                }

  Return to Index