?
Solved

How to set radio button value with JQuery

Posted on 2014-08-16
3
Medium Priority
?
256 Views
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']);
0
Comment
Question by:JElster
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 40264930
You're so close... just needs to be:

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

Expert Comment

by:Rob
ID: 40264931
0
 
LVL 1

Author Closing Comment

by:JElster
ID: 40264936
See my next question.. thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
This article discusses how to create an extensible mechanism for linked drop downs.
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…
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

839 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