Change
document.getElementById('personlist').getElementsByTagName('option')[11].selected = 'selected'
to
document.getElementById('personlist').value=Person_ID;
More Related Contents:
- What is the best way to add options to a select from a JavaScript object with jQuery?
- Adding options to a using jQuery?
- Change the selected value of a drop-down list with jQuery
- How to have a default option in Angular.js select box
- How to use Checkbox inside Select Option
- How to populate a cascading Dropdown with JQuery
- jQuery get specific option tag text
- Is there an onSelect event or equivalent for HTML ?
- Is it possible to use JS to open an HTML select to show its option list? [duplicate]
- How do you remove all the options of a select box and then add one option and select it with jQuery?
- Hide select option in IE using jQuery
- Removing an item from a select box
- Check if option is selected with jQuery, if not select a default
- How to use jQuery to select a dropdown option?
- How to add Drop-Down list () programmatically?
- How to ensure a form field is submitted when it is disabled?
- How do I clear all options in a dropdown box?
- Change ‘s option and trigger events with JavaScript
- How to keep cascade dropdownlist selected items after form submit?
- Creating a select box with a search option
- How to fire a change event on a HTMLSelectElement if the new value is the same as the old?
- option.style.display = “none” not working in safari [duplicate]
- set option “selected” attribute from dynamic created option
- Javascript to Select Multiple options [closed]
- Getting an option text/value with JavaScript
- HTML SELECT – Change selected option by VALUE using JavaScript
- How to hide optgroup/option elements?
- React Warning: flattenChildren(…): Encountered two children with the same key
- Can you have multiple lines in an element?
- Get drop down value