radio-button

JavaScript: radiobutton names get a 0 at the end

Hi I have a HTML form where which: clone a field set rename all radio button names in the set (they need to be unique so they are treated as a separate group after cloning). When I inspect the DOM after the cloning, all the radiobuttons has a 0 at the end of the name string. This happens in both Fx and IE, does anyone knows why? I...

Data bound radio button list in WPF

So I have a list of options in a data object, and I want to make the equivalent of a radio button list to allow the user to select one and only one of them. Functionality similar to a databound combo box, but in radio button format. Silly me, I thought this would be built in, but no. How do you do it? ...

How can I validate that at least 1 radio button is selected?

How can I validate that at least 1 radio button is selected? ...

.NET Radiobuttons "content" design

I'm trying to decide the best way of having radiobuttons switch around the contents of a panel (or another container), using Windows Forms .NET (C#), and maintaining the ability to use the Visual Studio designer on the form/usercontrol that contains these. What I'd really like is something like the TabControl where I can select the page...

No default radio button selected (J2ME, Java)

Currently working on a mobile app in J2ME and have questions with radio button answer options. Any suggestion on how to make it so that no default answer is selected? We've tried: cg8.setSelectedIndex( -1, true ); But get an out of bounds exception error and setSelectedFlags( boolean[] ) with all false, but also get another error. T...

Control link preferences with radio button controls and jquery

For any links with a particular CSS class, I'd like to control whether the links open in the same window, a new window or a pop-up (using onclick), based on the user's selection from a group of radio buttons -- and then save that choice in a cookie (all using jQuery). Anyone know how to accomplish this? ...

Change dropdownlist CSS when clicked or hover ?

Hi! Inspired by http://stackoverflow.com/questions/624102/enable-a-currently-disabled-dropdown-list-when-clicking-the-dropdown-list I tried something and I added some grey background to disabled selection. The problem is that when I click on some selection (which radio button was disabled) the background of the dropdown list remains gr...

How to change title of some text input depending on a radio with jquery ?

Hi! As you can see on http://jsbin.com/erivi/ I'm using Jquery to change some image (and image attribute) depending on radio button selected, I'm also removing form text when clicking inside it. And now what I'm trying to do is to change the text of the form depending on the radio button checked. For example when clicking on "Choice 3...

How can I make multi-line, vertically and horizontally aligned labels for radio buttons in HTML Forms with CSS?

Assuming the following markup: <fieldset> <legend>Radio Buttons</legend> <ol> <li> <input type="radio" id="x"> <label for="x"><!-- Insert multi-line markup here --></label> </li> <li> <input type="radio" id="x"> <label for="x"><!-- Insert multi-line markup h...

Javascript: Validating dynamically created radio button list control in ASP.NET

I have an ASPX page where in the page load i am dynamically creating some radio button list controls and rendering to browser.I will have 2 list items in each radio button list .One is Yes and second is No. The number of Radio buttonlist can be n.Now in my java script code, i want to know which radio button is clicked . I m already using...

Why do my radio buttons not work?

I'm working on an MFC dialog application in Visual C++ 2005. My radio buttons are m_Small, m_Medium, and m_Large. None of them display what they are supposed to in my m_Summary edit box. What could be wrong? Here's my code. // Pizza_ProgramDlg.cpp : implementation file // #include "stdafx.h" #include "Pizza_Program.h" #include "Pi...

Using ApplicationSettings to store Checked property for WinForms RadioButtons

I have a WinForms dialog box that contains 3 radio buttons. I am using ApplicationSettings to bind the Checked property of each of these RadioButton controls, but it doesn't do what I am expecting it to do. Now I have to click each radio button twice before it gets checked and the selected radio button is not being persisted. Is there a...

How to handle radiobutton change in IE 7

Hi, I have 3 radio buttons with attached callback: $('#formBuilding input[type="radio"]').change(projectChangeHandler); In callback projectChangeHandler I access radio value with: var currentSelection = $('#formBuilding input:radio:checked').val() In IE 7, unlike to other browsers, currentSelection has value from radiobutton whic...

Word-wrap radio button text in Java?

I have some radio buttons whose text may be very long. Is there an easy way to word-wrap them? Yes, wrapping them in <html> tags and inserting <br> tags would work, but is there a more automatic way to accomplish this? I don't really want to roll my own typesetter. ...

dynamically create radio buttons?

Referring to http://stackoverflow.com/questions/702925/creating-dynamic-radio-button-w-jquery , I was thinking how can this be handled if the input value('red' or 'blue') is retrieved from the database on a page load. Taking the same example from the above link, if Red, blue or other dynamic values, how can we build radio buttons on the...

jQuery radio onchange toggle class of parent element?

Hi, Please have a look on the following: $('#myRadio').change(function() { if($(this).is(':checked')) { $(this).parent().addClass('green'); } else { $(this).parent().removeClass('green'); } }); Markup lookslike somewhat as following <table> <tr> <td>Some te...

Make a radio button in an infopath form "read only"?

I'm making an InfoPath form which is tied to an Access database. I have a set of radio buttons where the user selects the software name corresponding to the form, but I store this in my database as a number (1, 2, or 3). In another view, I want them to be able to see the previously entered software name, but not be able to change this....

MFC separate groups of radio controls

I have added 8 radio buttons in my dialog layout in the resource manager, but I am having trouble separating them into 2 groups of 4 buttons. I have attempted to add a control variable, but I don't see the option of CButton available in the drop-down menu in the wizard. What would be the easiest method to accomplish this goal? ...

ASP .NET MVC: Html.Radiobutton onclick -- set ViewData[""]

Hi, I'm new to ASP .NET MVC and to web programming in general. I'm wondering if there is a way to set ViewData variables when a radiobutton is selected -- but before the page is submitted. Maybe I'm barking up the wrong tree but what I'm trying to do is create a form where new fields are added based on which radio button is selected. S...

Only allowing selection of one radio button in a form with PHP

A very basic question... How can I only allow the selection of one option in a list of radio buttons? <form action="process_repair.php" method="POST"> <label for "repair_complete">Repair complete</label> <input type="radio" name="Yes" value="true"> <input type="radio" name="No" value="false"> </form> When this code runs, it's po...