radio-button

jQuery select all radio button group

I am a newbie to Jquery, but I love what I have been able to do so far. I'm working on a long form that has several radio button groups. At the bottom is a radio button "No All". When it's selected I would like to make it so that all of the "N" radio buttons are selected, but I can't get it to work. Here is a simplified version of th...

Android - register button click and take action based on radio selection

I'm trying to teach myself how to write android apps and I'm having trouble registering a button click and taking actions based on which radio button is selected at the time. This is a simple tip calculator: import android.app.Activity; import android.os.Bundle; import android.widget.Button; import android.widget.EditText; import androi...

how to sum radio button values only one time ?

I am using this code to sum values from multiple radio buttons : $(document).ready(function(){ var total = 50000; $("input[type=radio]").change(function(){ $("input[type=radio]:checked").each(function(){ if (isNaN($(this).val())) { total = total; } else ...

RadioButton Repeater asp.net

Hello, I've added a radiobutton to a repeater in asp.net. I've made the group names work with some Javascript. The problem I am having is when I click save button, the radionbutton.Checked is always false. I can't get the radio button to hold it's checked value. ...

Rails: radio button selection for nested forms objects

I have the following form for photo_album which uses the nested forms feature of the Rails in saving the photos while updating the photo_album. And having trouble with the selection of radio button value. I want only one of the photos be able to select as the album cover, but due to the way rails produces form element ids and names, I am...

Hide Radiobox and Checkbox Name on Visual Studio Design View

I have been designing controls in Visual Studio 2008 and as you may have notice when I use radio button and checkbox web controls for ASP .NET it shows the name on design view, this causes me to see an odd preview because the text are unnecessarily wide. I was wondering if there is any settings in visual studio to turn this off? ...

Get/Set Checkbox and Radio Button values using Prototype

Prototype is great, but with the 1.6.1 release, the library still doesn't allow getting/setting of grouped inputs (checkboxes and radio buttons.) I'd like a way to get an array of selected values with $F($("form").checkboxes). I'd like to be able to set those checkboxes to an array of values, on the flip side. Ideas? ...

How to Catch ASP.Net RadioButton CheckChanged Event in a DataGrid

I have a RadioButton in a TemplateColumn of a DataGrid. Each RadioButton is part of the same group to make sure that only one is selected and they are set to AutoPostBack. What I would like to do is trap the OnCheckedChange event and handle it like a button click within the DataGrid (using the OnItemCommand event handler). Does anyone ...

Detecting a JRadioButton state change

How can I detect when a JRadioButton is changed from 'unselected' to 'selected' when clicked with the mouse? I've tried using an ActionListener on the button, but that gets fired every time the radiobutton is clicked, not just when it's changing state to 'selected'. I've thought of maintaining a boolean variable that remembers the state...

How to implement a XAML Radio Button control with an ObservableCollection source?

I have the following ComboBox element in XAML: <ComboBox ItemsSource="{Binding CollectionControlValues}" SelectedItem="{Binding CollectionControlSelectedValue, UpdateSourceTrigger=PropertyChanged}"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Value}" /> </DataTemplate> </Combo...

How to change PHP form redirection depending on radio button or drop-down list selected?

Hi! The idea is to be able to perform some search query depending on radio button selected or drop-down choice. I know my PHP code is wrong, that's why I need your help ;-) My testing page is available here (click). HTML code is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-stri...

Creating a Cocoa radio button programatically

I need to make a Cocoa radio button programatically, can anyone explain how this might be done or post a good link that shows how to do this well. ...

How to decide what radioButton is on in a View?

In my controller I am setting my value to true: ViewData[itemName] = true; Then in my view I am trying to set the item with true as select radio button. I have tried the following: <%= Html.RadioButton("default",item.Name, ((bool)ViewData[item.Name])==null ? false:true) %> <%= Html.RadioButton("default",item.N...

Autoposting Radiobuttons in ASP.NET MVC view

Hi, I'm trying to add a couple of radiobuttons at the top of a View (using ASP.NET MVC). I want the two radiobuttons (option 1 and option 2) to cause the page to be refreshed/autoposted when changed. The two radiobuttons live inside a separate .asxc (Menu.ascx), and added with Html.RenderPartial in a List.aspx page. The two options in ...

JavaScript\JQuery - identifying if radio button value changed by click

I have a page that displays a list of records. The user can select the record status using radio buttons, e.g.: <div id="record_653"> <label><input type="radio" name="status_653" value="new" checked/>new</label> <label><input type="radio" name="status_653" value="skipped" />skipped</label> <label><input type="radio" name="status_...

WPF - How to make RadioButtons generated by a DataTemplate be mutually exclusive?

One of the apps I am building needs to build a survey for users to take. The relevant classes related to my question are: Survey (string Description, List<Questions> Questions, QuestionTypes Type) Question (string Description, List<Choice> Choices) Choice (string Description) enum QuestionTypes {MultipleChoicesOneAnswer, MultipleCho...

.net listview find if atleast one radiobox selected in eah row

Hi, i have a listview with 2 or more radio button controls in each row of it and i want to findout if atleast one radiobutton selected on submit. for example ROW 1 Quetison 1 radiobutton1 radiobutton2 radiobutton3 ROW 2 Quetison 2 radiobutton1 radiobutton2 radiobutton3 on submit i want to find...

Change background color on radio select

I have the following code <form id="form1" name="form1" method="post"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td ><div class="label_main" id="lab1"> <div class="label_radio"> <input type="radio" name="group1" id="r0" value="0" /> </div> <div class="label_top...

selected input type radio button asp.net

<input type="radio" name="group1" />1 <input type="radio" name="group1" />2 How do i know witch one is selected when the form is posted ? ...

Using "label for" on radio buttons

When using the "label for" parameter on radio buttons, to be 508 compliant, is the following correct? <label for="button one"><input type="radio" name="group1" id="r1" value="1" /> button one</label> or is this? <input type="radio" name="group1" id="r1" value="1" /><label for="button one"> button one</label> Reason I ask is that ...