radio-button

Submit form (Ajax style) when a radio button is selected -- Struts2

In Struts2 I wanted to refresh(submit) a portion of page on selection of a radio button (Ajax) retaining all the rows in table of rows. Can someone please help with the code for this. ...

jQuery check/uncheck problems

I'm using a gridview that has a radio button in one of the columns. It's used as a true/false flag. Anyways, because of the nature of my project, I require javascript to uncheck any radio buttons when I check another one. This works fine, except that my gridview is wrapped in an update panel. I am taking care of reintializing the jQuery ...

WPF/C# - example for programmatically create & use Radio Buttons

Hi, Can someone point to an example of how to programmatically create & use Radio Buttons in C# WPF? So basically how to (a) create them programmatically, and (b) how to catch triggers when the value changes, (c) how to pick up results at a given time. Will be interested to see too if the answer will be based on use of a Binding app...

How would I format Zend_Form_Element_Radio so the label follows the input?

The default decorator for the Zend_Form_Element_Radio is <label for="type_id-1"><input type="radio" name="type_id" id="type_id-1" value="1">Pack</label> The label tag wraps the input tag. Instead I would like to to look like <input type="radio" name="type_id" id="type_id-1" value="1"><label for="type_id-1">Pack</label> I thought i...

How to get the text value out of a radio button list

So I have two group boxes, what I am wanting is to get the selected radio button value from both of them. If it was just a text box you can go: thisValue = textbox1.text But I have no idea how to do it for a radio button ...

Ruby on Rails: form and radio button question

I have a form around a list of items. I would like to check a radio button on the list and then, after clicking 'Submit', go to the 'Edit' page of the selected item. The problem is that if I am writing something like <%= form_tag edit_item_path %> but Rails complains that I didn't provided a proper id, which in turn is being set on...

Get selected radio button not in a list in ASP .NET

I have a number of radio buttons belonging to a group. I don't have them in a list, as they are all scattered around the page. How can I easily get the selected radio button? ...

Zend Form Radio Default Checked

I have the next radio button group: $enabled = $this->createElement('radio', 'enabled') ->setLabel('Enabled') ->setMultiOptions(array('1'=>'yes', '0'=>'no')) ->setValue($rank_values['enabled']) ->setAttrib('id', 'enabled') ->setAttrib('class', $action . '_en...

Get selected RadioButton inside a group

I have a winforms app with a group box called priceClassGroupBox. Inside it I dynamically add RadioButtons to which I give a name, say radio1, radio2, radio3. I have 2 questions: Can I automatically select a given RadioButton by it's name without iterating through each control? Can I get the name of the selected RadioButton without i...

Django / Python, Using Radio Button for boolean field in Modelform?

I'm trying to use a radio button in my modelform but its just outputting nothing when I do an override this way (it just prints the label in my form, not the radio buttosn, if I don't do the override it does a standard checkbox) My modelfield is defined as: Class Mymodelname (models.Model): fieldname = models.BooleanField(max_lengt...

can i use a session variable as the text of a listitem in a radiobutton list?

I have this code <asp:RadioButtonList ID="rblSplitWeek" runat="server"> <asp:ListItem selected="true">No Choice</asp:ListItem> <asp:ListItem Text = "First" Value = "Session('s_price_1')"></asp:ListItem> <asp:ListItem Text = "Second"></asp:ListItem> </asp:RadioButtonList> But keep getting...

radio button ruby on rail

Hi, I was wondering if there is a way to use radio button to set the value of a field that is a text box. <%= radio_button("demographics_questionaires", "gender", "Male")%> Male <br\> <%= radio_button("demographics_questionaires", "gender", "Female")%> Female <<br\> <%= radio_button("demographics_questionaires", "gender", ...

Disable drop down box on radio button click

Hi, I have two radio buttons and a drop down box as you can see below. What I want to do is: 1. While no is checked, either hide, or grey out the drop down box, and 2. While yes is checked, show the drop down box. Any pointers would be appreciated! <td colspan="4"> <input name="discount" type="radio" id="Yes" value="Yes" />Yes <input ...

Help with javascript to hide radio buttons

Hi guys, I got this code on here recently <script type='text/javascript'> $('#discountselection').hide(); $('#No').click(function(){ $('#discountselection').hide(); }); $('#Yes').click(function(){ $('#discountselection').show(); }); </script> The aim being to hide a drop down box depending on wheth...

MVC 2 - two radio button group persist state

Hi Guys, I have two radio button groups in my partial view and based on the selections of two I have to manipulate an "Extension Area (div)". The requirement is to default the radio button groups to first ones by default and show the Extension Area relevant to it. The problem is when there is a validation error I am not able to persist ...

Radio Button producing undefined value in javascript function

I am trying to send the value of a radio button to a javascript function. Eventually the function will do more but my testing it has come to a dead end because I keep getting a returned value of undefined. Here is what I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transiti...

dynamic html forms radio buttons

I am working on a dynamic form. The form has 3 radio buttons. when you click on radio button 1, a drop down populates. when you click on radio button 2, a drop down populates. etc after the user has clicked on the radio button on part 1, there is another radio button that asks the user if they want another try. eg. another radio button...

WPF radio buttons - MVVM - binding seems to die?

I've bound the data context of the following Window to the code behind to give me a MVVM style to demonstrate this behaviour: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="3...

jQuery UI radio button - how to correctly switch checked state

If I have a set of radio buttons, all styled with jQuery UI's .button(). I want to change their checked state, but when I do so programatically on the container's change event with $("#myradio [value=1]").attr("checked", false); $("#myradio [value=2]").attr("checked", true); The values are changed correctly, but the UI styling stil...

autoselect radio button when checkbox is checked in jquery

Hi All I have a list of 3 radio buttons with the 1st radio that's selected at load time. The 3rd button has a group of checkboxes related to it. When one of the checkboxes is checked the related radio button should be selected automatically. The problem is that this action doesn't work in Chrome of Safari but works fine in FF, Opera and...