DHTML Combo onSelect

Hi,



    I have a HTML form,

    which has Two elements.

    

    1. D HTML combo box with auto complete mode.



    2. HTML Text Box



    If the user select any value from the D HTML Combo box,

i want to set the D HTML Combo’s associated value to the HTML Text box.



    For example

    

    XML

    

        A

        AA

        AAA

        AAAA

    

    

    If the user select AAAA, then the curresponding value for AAAA = 4 will be placed in the HTML Text Box.



    How to achieve this?



    Please advice.





With latest combo version it may look similar to next
   
    combo.attachEvent(“onChange”,function(){
       someInput.value=combo.getSelectedValue();
    });