I have inherited an MVC forms that emit selects dynamically identified and named by a prefix, a guid, and a suffix. For example,
<select id="N9_ID_f0d7ca03-0221-41b7-a457-3494b9e483e3__N9QualifierID" name="N9[ID_f0d7ca03-0221-41b7-a457-3494b9e483e3].N9QualifierID"> <option value="58">Automated Export System (AES) Internal Transaction Number (ITN)</option> <option value="60">Automated Export System Export Information Code Exemption Number (Note 1)</option> <option value="59">Automated Export System Option 4 Employee Identification Number</option> <option value="8">Bill of Lading</option> <select> There will be several selects with the same prefix and suffix. The prefix and suffix effectively partitions the selects into a class and guid ties the dynamically generated selects to other dynamically generated controls such as textboxes. I need to find the the select that has a given value so I may extract the guid and do stuff with other inputs that have that guid.
My Question:
Using JQuery, how do I select the select(s) that have a given selected value? For example, I know at least one of the selects will have a selected value of 59, but I don't know which one.