I need a jquery selector that allows me to
find input (select/option) dropdown
– where name of SELECT is ACTC and
– selected value is ABC
I think it’s something like:
myTmpl.find("input[name='ACTC']").val('ABC');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t really see the application in what you’re trying to do. Why not just get the current value of the select box with the name ‘ACTC’ and test to see if it’s ‘ABC’?
The selector for the
<option>tag would be:If you want to see if the option with value “ABC” is selected you could check like so:
If you actually wanted to mark the specific option as selected you would do this:
If you just want to find the
<select>box with the selected value of “ABC” (mind you this would only be necessary if you had multiple select boxes with the same name):