How do I set the dropdownlist with a value of custom to the current selected item in jquery?

Posted on 2013-01-21
Last Modified: 2013-02-06
How do I set the dropdownlist with a value of custom to the current selected item in jquery? code attached

 <select class="dropDown optional-degree" data-val="true" data-val-number="The field Cost Tools must be a number." data-val-required="The Cost Tools field is required." id="AttackSequenceEditModels_CostToolsId" name="AttackSequenceEditModels.CostToolsId"><option value=""></option><option data-score="0.2" value="1">Low</option><option data-score="0.6" value="2">Medium</option><option data-score="0.9" value="3">High</option><option data-score="0" value="4">Custom</option></select>
Question by:cbrune
  • 2
LVL 22

Expert Comment

ID: 38805066
Hi cbrune, Can you pl explain more what exactly you want to achieve?

Mean while you can look at this example. hope this helps you.

Author Comment

ID: 38805935
i want to have a button on the page that sets the dropdown to custom
LVL 22

Accepted Solution

Mrunal earned 500 total points
ID: 38813308
Check this:

This sets dropdown list value to custom on button click.

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now