I'm trying to select an option of a Dropdownlist using Javascript. My html Looks like the following:
<select id="active-drop" name="active">
    <option value="true">Aktiv</option>
    <option value="false"> Inaktiv </option> 
</select>
and my Javascript look like this:
$("#active-drop option[value='true']").attr("selected",true);
$("#active-drop option[value='false']").attr("selected",false);
The Problem here is, the Attribute is set just fine but the UI isn'z updated accordingly.
btw I already tried using selectedIndex but this yielded the same result(the data is set correctly but the UI isn't updated)
 
     
     
    