Community Forums 

Main Content

Re:Expand drop down list to show all options

    Feb 13 2017 10:37:10



    Join date : 2008-09-18      Posts : 417

    To show all options in a dropdown use the size attribute. Javascript is used to display the selected option. Below is a simplified form to show how it would work.


    <select size="3" onchange="document.getElementById('selection').innerHTML=this.options[this.selectedIndex].value">

    <option value="birth">birth</option>
    <option value="death">death</option>
    <option value="marriage">marriage</option>


    <p><input type="text" value="">&nbsp;<span id="selection"></span></p>