radio-button

jquery enable/disable text box based on radiobutton

hi, in my jsp i have a radiobutton group and a textbox (which is disabled initially) . whenever user clicks on last(or, one of the) radio button the textbox should be enabled and when user clicks on some other radiobutton text box should again get disabled. i am able to enable the initially disabled checkbox with the following code : ...

Handling Spring MVC form:radiobutton with Jquery

hi there, has any one using Spring MVC with Jquery! i have got a strange problem when handling Spring MVC tags with Jquery. i used tags of spring MVC to get radiobuttons binded. <form:form name="Form1" method="post" action="Form1.do" commandName="Page1Command"> <form:radiobutton path="group" value="TTSE" id="DevGroup_TTSE" /> <for...

radio button select on label click

i have following code for radio buttons how can make radio buttons to be selected when i click on any of two labels in front of that radio button. <div class="label_main" style="width:350px"> <div class="label_radio"> <input type="radio" name="group1" id="group1" value="0" <?php if($r0==0) { ?> checked="checked" ...

How do you get the checked value of asp:RadioButton with jQuery?

I need to do something like this: <asp:RadioButton ID="rbDate" runat="server" Text="Date" GroupName="grpPrimary" /> and be able to check the value of the radio button's checked value in jQuery, but my attempts like these don't return true/false. if ($('[name=rbDate]').attr("Checked")) if ($('[name=rbDate]').attr("Checked").val()) i...

Cross-Browser Issue Regarding onchange/onfocus

Hi, I'm trying to turn a <label/> and <input type="radio"/> into a single button that when clicked, adds that specific product to a shopping cart. This example deals with 1 product, with potentially multiple variants, (ie. The Product would be "Denim Jeans", the Variants would be sizes, "26", "27", "28"). The HTML would look something...

Rails form with multiple nested models causes issues with radio groups

I'm having a problem with nested model forms that contain radio buttons, when I have multiple models all the radio buttons are treated as being in the same group. My model contains a has_many relationship like this: class Order < ActiveRecord::Base has_many :order_items accepts_nested_attributes_for :order_items end Class Orde...

Android RadioButton return a constant?

I am trying to perform a rating system, where with the choices to select from returns a constant number so I can insert a value into a database. My intentions are to have 3 choices, 'Great', 'Mediocre' and 'Bad'. I would like Great to be a constant for '3', Mediocre to have a constant '2' and Bad to have a constant for '1'. I would like ...

how do radio buttons work with asp.net mvc binding

i have an strongly typed object that represents all of the textbox properties of a form and it works fine when i post to the controller. i now need to add a radio button to this form. how does that map to the strongly typed objects? ...

not getting radio button values in jquery ajaxform

Hi, I have a form which is binded to a JQuery Form (AjaxForm) object. In the form I have some radio buttons: <input type="radio" id="dialog_stranka_dodajuredi_tip_fizicna" name="dialog_stranka_dodajuredi_tip" value="2" /> Selection 2 <input type="radio" id="dialog_stranka_dodajuredi_tip_pravna" name="dialog_stranka_dodajuredi_tip" val...

Radiobutton.Checked not working for first button in group

I've got a check for the first radiobutton in my group of ASP.NET radiobuttons. For some reason, the page loads and that first button is automatically checked, not that we're setting it to be checked..it must naturally check itself since it's the first in the group. However, when I actually check that it's checked in an if statement (s...

Radio Buttons display incorrectly in IE7 but ok in Firefox?

Hi, I have a site setup that is working fine in ie8 and firefox but as you can see here: Is this an issue with some css or a png transparency? Or is this just something with IE7. Thanks in advance :) ...

In WPF, is it possible to have a combo box control, that looks like a RadioButton?

I have a whole bunch of code that is dependent on the ComboBox type, and I want to be able to use it on a new UI, but the UI that I want to use it for needs to look like a RadioButton for usability reasons. Is it possible to have a ComboBox control look like a set of RadioButtons? ...

Can I make WPF RadioButtons look like CheckBoxes?

I want to have the behavior of RadioButtons, but show them as CheckBoxes to the user. Is this easy to do? ...

Firefox Radio Button Weirdness

I have a form with a lot of groups of radios. Each radio has a unique id and has the same name as the others in its group. The page validates as XHTML transitional. Tested in IE6 & 7, Opera, Safari, and Chrome it works exactly as you would think it would from either mouse or keyboard input. In FireFox it goes crazy. A single click o...

PHP - How to update data to MySQL when click a radio button

Example to save gender <form action="save.php?id=<?=$id?>" method="post"> <p><label><input name="gender" type="radio" value="male" <?php if($gender=='male'){?>checked="checked"<? }?> /> Male</label></p> <p><label><input name="gender" type="radio" value="female" <?php if($gender=='female'){?>checked="checked"<? }?> /> Female</lab...

Unwanted dotted-line selection aroudn empty text for WPF RadioButtons

Hi, I have two radio buttons next to each other, and even though each one has no Content/Text, there is this ugly little dotted-line box that shows up next to which ever one has the focus (I think it wrapping the place where text/label would normally be). Can I get rid of this? ...

Why does my customized WPF RadioButton not look right?

I am replacing the style of a radio button with that of a check box. I know you are going to say that is a bad idea, but it really needs to work this way. Anyway, using Expression Blend I was able to extract the style of the CheckBox and apply it to a RadioButton. My only problem is now that when it draws there is no border. Can anyo...

Problem accessing OnChange javascript event of Radio Button

I'm running in to the same problem this individual has. Specifically, I'm trying to get a clientside onchange javascript event to fire for my Radio Button. Unfortunately, the code gets rendered with the onchange located on a span surrounding the radio button instead of on the radio button itself. I am using other javascript within the...

In JavaScript, how can I get all radio buttons in the page with a given name?

Like the title says, what's the best way in JavaScript to get all radio buttons on a page with a given name? Ultimately I will use this to determine which specific radio button is selected, so another way to phrase the question: Given a string variable in JavaScript, how can I tell which exact radio button input element (if any) with t...

jquery javascript: take action when radio button is selected

I have the following radio buttons, none of which is checked by default. <input type="radio" name="location" value="0" /> home <input type="radio" name="location" value="1" /> work <input type="radio" name="location" value="2" /> school How do I detect when either of them is checked. I'm looking for something like click, but it's not...