jQuery’s documentation states:
[jQuery.val] checks, or selects, all the radio buttons, checkboxes, and select options that match the set of values.
This behavior is in jQuery
versions 1.2
and above.
You most likely want this:
$("._statusDDL").val('2');
Add .change()
to see the option in the dropdown list frontend:
$("._statusDDL").val('2').change();
Related Contents:
- What is the best way to add options to a select from a JavaScript object with jQuery?
- jQuery get specific option tag text
- How do you remove all the options of a select box and then add one option and select it with jQuery?
- Ajax request returns 200 OK, but an error event is fired instead of success
- Adding options to a using jQuery?
- jQuery $(document).ready and UpdatePanels?
- Removing an item from a select box
- jQuery remove options from select
- make iframe height dynamic based on content inside- JQUERY/Javascript
- jQuery returning “parsererror” for ajax request
- Check if option is selected with jQuery, if not select a default
- How to change the text of a label?
- How to use jQuery to select a dropdown option?
- What is jQuery Unobtrusive Validation?
- How can I validate google reCAPTCHA v2 using javascript/jQuery?
- TypeError: $(…).DataTable is not a function
- How to do a Jquery Callback after form submit?
- Verify External Script Is Loaded
- Creating a select box with a search option
- What is the most efficient way to sort an Html Select’s Options by value, while preserving the currently selected item?
- Best way to get all selected checkboxes VALUES in jQuery [duplicate]
- JQuery select2 set default value from an option in list?
- how to parse a “dd/mm/yyyy” or “dd-mm-yyyy” or “dd-mmm-yyyy” formatted date string using JavaScript or jQuery [duplicate]
- set option “selected” attribute from dynamic created option
- Disable asp.net button after click to prevent double clicking
- Hide select option in IE using jQuery
- Keep overflow div scrolled to bottom unless user scrolls up
- How to open a URL in a new Tab using JavaScript or jQuery? [duplicate]
- The preferred way of creating a new element with jQuery
- How can I update window.location.hash without jumping the document?
- Why does javascript replace only first instance when using replace? [duplicate]
- Microsoft CDN for jQuery or Google CDN? [closed]
- How to save an image to localStorage and display it on the next page?
- How to send a JSON object using html form data
- How to clone and change id?
- How to prevent ajax requests to follow redirects using jQuery
- Get an array of list element contents in jQuery
- jQuery location href [duplicate]
- Uncaught SyntaxError: Failed to execute ‘querySelector’ on ‘Document’
- How do I make a div full screen?
- Trying to detect browser close event
- How to set file input value when dropping file on page? [duplicate]
- Passing dynamic javascript values using Url.action()
- jQuery function not binding to newly added dom elements
- How to POST a django form with AJAX & jQuery
- Cannot set property ‘_renderItem’ of undefined jQuery UI autocomplete with HTML
- jQuery select element by XPath
- Using jQuery, how do you find only visible elements and leave hidden elements alone?
- jQuery UI autocomplete with item and id
- How to change only text node in element [duplicate]