This is what I have in the javascript.  Its allowing me to move names from LHS 
to RHS but names are still not being selected in the RHS automatically.

Thanks in advance for feedback/tips.




<script>
        
        function moveOver()  {
                var boxLength = document.choiceForm.choiceBox.length;
                var selectedItem = document.choiceForm.available.selectedIndex;
                var selectedText = 
document.choiceForm.available.options[selectedItem].text;
                var selectedValue = 
document.choiceForm.available.options[selectedItem].value;
                var i;
                var isNew = true;
                
                if (boxLength != 0) {
                        for (i = 0; i < boxLength; i++) {
                                thisitem = 
document.choiceForm.choiceBox.options[i].text;
                                if (thisitem == selectedText) {
                                        isNew = false;
                                        break;
                           }
                        }
                }
                
                if (isNew) {
                        newoption = new Option(selectedText, selectedValue, 
false, false);
                        document.choiceForm.choiceBox.options[boxLength] = 
newoption;
                }
                document.choiceForm.available.selectedIndex=-1;
                selectAllOptions('document.choiceForm.choiceBox');
        }
        
        function selectAllOptions(obj) {
    if (!hasOptions(obj)) { return; }
    for (var i=0; i<document.choiceForm.choiceBox.options.length; i++) {
        document.choiceForm.choiceBox.options[i].selected = true;
        }
    }





>> I'm wondering if anyone has any links and/or javascript for working with
>> two list boxes on a screen.
>
>http://www.mattkruse.com/javascript/selectbox/
>
>check out the selectAllOptions() method in the source.
>
>HTH,
>Rich Kroll 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290400
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to