DropDownlist getting value by id
i try to retrieve value of dropdownlist value but it prints undefined why ? 


    var selected =  $("#checkedSelect option:selected").val();


i take like that 

    {foreach from=$allTypes value=types}
                            <option id="checkedSelect" value="{$types.id}">{$types.type}</option>
                               {/foreach}
DropDownlist getting value by id
===

i try to retrieve value of dropdownlist value but it prints undefined why ? 


    var selected =  $("#checkedSelect option:selected").val();


i take like that 

    {foreach from=$allTypes value=types}
                            <option id="checkedSelect" value="{$types.id}">{$types.type}</option>
                               {/foreach}