radio-button

How to use jQuery to assign a class to only one radio button in a group when user clicks on it?

I have the following markup. I would like to add class_A to <p class="subitem-text"> (that holds the radio button and the label) when user clicks on the <input> or <label>. If user clicks some other radio-button/label in the same group, I would like to add class_A to this radio-button's parent paragraph and remove class_A from any othe...

grails set bean value from radio button

I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regard...

radio button loses value on postback

Hi I have a set of radio buttons for "yes" and "no" values which have a name="choice". "yes" is checked by default. They're both runat="server". I read the choice on postback like below. It works perfectly fine as long as the validation doesn't fail. For example, if I select "no" and validation fails on postback, I still see "no" se...

How do you change an HTML radiobutton selection from Javascript?

I need to select an HTML radiobutton (deselecting any previously selected radiobutton) on my form, from within Javascript. How is this accomplished? ...

Android: Where to find the RadioButton Drawable?

Ok, I am trying to create a custom view called CheckedRelativeLayout. It's purpose is the same as a CheckedTextView, to be able to use it in a list of items you want selected or in a Spinner. It's all working fine now, I extended RelativeLayout and implemented Checkable interface. However, I am stuck on a quite simple problem: Where c...

ASP.NET Radio Button State and Back Key

I have an ASP.NET page with two radio buttons. The buttons use an auto-postback to run server side logic. If you select the second button, the page posts back and correctly displays a message that the second button is selected. If the browser back button is now clicked, the state of button 2 stays checked while the message reverts to ...

How can I check a radio button on load, based on it's value?

I've got the value of a radio button (r1) and I'm trying to use: $("input:radio[val=r1]").attr('checked', true); to check it. The thing is that I've got three radio buttons in a div, when I check one, the value of the checked button gets stored. When I reload the page I want the page to check the radio button that was chosen last...

Radio Buttons with different Names?

Does anyone have a no JavaScript way to make HTML radio buttons belonging to the same "group" have different "name" attributes? While I figure there isn't any way, I'm working on a site which needs to still be function when JS is off, and this would be ideal. Addendum It's not a requirement as much as a preference; there's a kind of c...

android radiobutton disabled

If I create a checkbox view and call setEnabled(false), the checkbox look is grayed but if I create a radiobutton, the view is inactive but it is not grayed. Any idea ? ...

mvc bind/post boolean to radiobutton

Hi all, I have a column in my Model with a NULLABLE boolean value. Now on my View (for editing), I would like to bind that to two radiobuttons: Yes & No. If the value is null, then just have the two radiobutton un-checked. How would I go to do that? Thanks. ...

Calling a datatrigger for a radio button inside a datagrid

I have a datagrid with one column having a radio button. I want to set the GroupName when a certain condition is reached. Below is the code <Custom:DataGrid.Columns> <!-- ONLY ENABLED WHEN THE ITEM TYPE IS SINGLESELECT OR SINGLESELECT WITH ADDIOTIONAL DATA--> <Custom:DataGridTemplateColumn Ca...

finding the value of radio button with jquery

i have this code below to show different divs when i choose certain radio buttons: if ($("input[@name='exerciseRB']:checked").val() == 'New') { $("#newExercise").show(); $("#existingExercise").hide(); } else { $("#newExercise").hide(); $("#existingExercise").show(); } at first, i just had two radio buttons (both na...

radio button group matlab

i have two set of button groups. first button groups has two radio buttons and second group has four radio buttons. if button 1 is selected in group1 and any one from the group 2. similarly for button2 in group 1 and any one from group2, respective function calls must be made on click of push button with these combinations. how to do it...

ASP.NET MVC2 Radio Button generates duplicate HTML id-s

Hi, It seems that the default ASP.NET MVC2 Html helper generates duplicate HTML IDs when using code like this (EditorTemplates/UserType.ascx): <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UserType>" %> <%: Html.RadioButton("", UserType.Primary, Model == UserType.Primary) %> <%: Html.RadioButton("", UserType.Stand...

Shopify: Replacing Product Radio Buttons With Dropdown Select

Hi, With Shopify I am trying to alter my product template to display a dropdown select list instead of radio buttons for my product variants. I managed to do this but when you try and add a product to the cart from the list it says, "No variant ID was passed." Here is the code for their radio buttons: <ul id="product-variants"> ...

Can I un-check a group of RadioBottoms inside a group box?

radio bottoms inside a group Box will be treated as a group of bottoms. They are mutual exclusive. How can I clean up their check states?? I have several radio bottoms, one of them are checked. How can I "clean" (uncheck) all radio bottoms?? "setChecked" doesn't work within a group, I tried to do following things but failed. My code is...

Flex ; get the value of RadioButton inside a FormItem

Hi, I'm working on Flash Builder with latest flex SDK. I have a problem getting the value radioButton of the selceted radio button inside a form: <mx:Form id="form_new_contribution"> <mx:FormItem label="Contribution type" includeIn="project_contributions"> <mx:RadioButtonGroup id="myG" enabled="true" /> <mx:RadioButton id="subtit...

jQuery:Looping all radio buttons inside an HTML table

I have an HTML table having n rows and each rows contain one radiobutton in the Row.Using jQuery , How can i look thru these radio buttons to check which one is checked ? ...

checkbox for Drupal CCK

Hi friends, I'm new at Drupal. love it so far :) I'm creating a CCK custom content type. I need to make a amenities list in checkbox format. so I made; File Type: Text Widget Type: checkboxes/radiobuttons and Allowed values list: onsite_dining|Onsite Dining meeting_space|Meeting Space business_center|Business...

ASP MVC Set RadioButton From Database

Hello All, I have what should be an easy question for you today. I have two radio buttons in my view: Sex: <%=Html.RadioButton("Sex", "Male", true)%> Male <%=Html.RadioButton("Sex", "Female", true)%> Female I need to select one based on the value returned from my database. The way I am trying to do it now is: ViewData["Sex"] = data...