How to set radio button value with JQuery

Posted on 2014-08-16
Last Modified: 2014-08-16
Hi.. I have the following.

  Issue:<input type="radio" name="IssueEdit" value="N" />No
            <input type="radio" name="IssueEdit" value="Y"/>Yes

JSON returns a 'Y'   how do I set the radio button option to 'Y' (Yes)

This doesn't work
 $(' #IssueEdit[name=Option]').val(['Y']);
Question by:JElster
    LVL 42

    Accepted Solution

    You're so close... just needs to be:

     $(' Input[name=IssueEdit]').val(['Y']);
    LVL 42

    Expert Comment

    by:Rob Jurd, EE MVE
    LVL 1

    Author Closing Comment

    See my next question.. thanks

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question ( on how to make a page show some balloons animate up a page…
    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    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…

    755 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

    18 Experts available now in Live!

    Get 1:1 Help Now