Try the following: (2 modifications: value's ... value and <option value="1">1</option>)
<script>
function updateItem(item) {
$.post("updater.php",{key:item.id, value:item.options[item.selectedIndex].value}, function(response) {
$('#response').html(response); });
}
</script>
<div id="response"></div>
<select id="primary_key" onchange="updateItem(this)">
<option value="1">1</option>
<option value="2">2</option>
</select>
I used jsfiddle, IE7 and debugBar to find them. http://jsfiddle.net/d3xk8/
source
share