radio-button

ASP RadioButton Client Event Not Triggering

Hey, I'm dynamically generating radio buttons in my code behind and assigning javascript to them as they are created. This javascript will change the value in a hidden field for when a postback is eventually triggered (autopostback on the buttons is disabled). I am using the exact same method with ASP ImageButtons and it works fine bu...

Make my radio buttons become selected in Android

When I run this could and click on the dialog box my radiobuttons do not become selected like intended package edu.elon.cs.mobile; public class PTCalculator extends Activity{ private RadioButton maleRadioButton; private RadioButton femaleRadioButton; private EditText ageEdit; private EditText pushUpsEdit; pr...

RadioButton checkedchanged event firing multiple times

Hi, I am trying to add multiple radiobutton columns to my gridview dynamically in the code and i want to implement some logic which involves database fetch in the checkedchanged event of radiobuttons but some how the checked changed event is being fired multiple times for each row. Following is the code: aspx: BorderWidth="1p...

radiobutton checked on condition in jquery

I have the following fields: <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('slow');$('#primary_company').find('option:first').attr('selected','selected');" type="radio" runat="server" name="companyType" id="primary" />Primary</label> <label for="secondary...

How do I find the previous/default value of a radio button in JS?

I'm not sure if this is even possible, but I figured I'd ask before clubbing togehter an ugly solution. What I have is a group of radio buttons and I want to trigger a function if the radio button value is changed. For example say there are three buttons X Y and Z with Y default selected. If a user clicks on an unselected button (i.e. ...

ASP.NET MVC2 : How to use radiobuttons in a grid ?

Again a question about RadioButtons/ RadioButtonList I've the following Model: public class SkillLevelModel { public long? Id { get; set; } public int? SelectedLevel { get; set;} } I've the following Controller: public class SkillController : BaseController { public ActionResult Index() { ...

odd behavior when checking if radio button selected in jQuery

I had the following check in my jQuery which I thought was working fine to see if a radio button was checked. if ($("input[@name='companyType']:checked").attr('id') == "primary") { ... } Here's the radiobuttons: <p> <label>Company Type:</label> <label for="primary"><input onclick="javascript: $('#sec').hide('sl...

set radio button in jquery dialog

I have the following if/else on another form and it works perfectly. I've now put it on a form which shows as a jquery dialog. Every alert along the way shows the correct assignment, but when the dialog opens, neither button is selected. $("#create-company").click(function() { alert($('#primary_company').val().leng...

MVVM Group Radio Button

What is the best way of binding a number of RadioButtons to an enum using MVVM? The only way I can think of is binding each group box's IsChecked to a property, and in the setter of that property assign a value to an enum in the view model. Any help is appreciated. ...

Any way to change the color of a radio button?

I'm working on an android form with a radio group containing a set of radio buttons. From what I can tell there is no way to set the color a radio button highlights when you select it. It seems to always default to some bright green color. Is this something that is editable or no? Thanks ...

jquery question about small calcation when radio button is checked.

jQuery $(function() { var service1price = 1; var service2price = 2; $("#service1checked").one('click', function() { $('<div id="service1ok"> Service Number 1, ' + service2price + ' $ </div>').fadeIn().appendTo('.selecteditems'); }); $("#service2checked").one('...

How to make RadioButtons Mutually excusive

I have 7 RadioButtons on a Form 3 of them belongs one group and 4 of them to other group I want the RadioButtons to be mutually exclusive within the group. This can be achieved by putting them in two GroupBoxes, Is there any way we can achieve this without putting them in a container like groupbox ...

making check boxes clickable once in javascript?

Sorry but im an absolute noob with javascript. Ive made a form for a simple quiz but cant figure out how to make radio's only click once. I can select two or three buttons as my answer. i want to change this. <form name = "Beginners Quiz"> <p>Film speed refers to:</p> <p><input type="radio" name="Answer 1" id="Answer1" value = "a" on...

Radio Buttons not highlighting as though they are selected

I'm working on an android activity with a RadioGroup containing 10 RadioButtons. For some reason or another sometimes, only sometimes, when you select a RadioButton in the RadioGroup it doesn't highlight as if it's selected but through some tests I've determined that it really IS selected even though it isn't highlighted. Another odd thi...

When radio button selection changes do not cause refresh?

When the selection of the radio buttons change I would like to show/hide the panel in the next table cell. I have it hiding and showing fine but each time it causes the page to refresh to the top. Is their a way to stop that refresh? I would like to hide and show the panel dynamically. <table> <tr> <td> <a...

Radio Button selection Changes Toast on Android

I was writing a simple test application. There are two radio buttons within the app. There id's are "radio_red" and "radio_blue". I wanted to create an onClickListener event that read the text associated to the button and then returned a basic "Right" or "Wrong" toast. Here is a sample of the code: private OnClickListener radio_listene...

Parse error: expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ..?

I tried to put an if statement inside an echo but this parse error came up, is it not possible to do that? should I use heredoc instead? echo "<input name='main_branch' type='radio' value='1' <?php if($restaurant['main_branch'] == 1) { echo "checked"; } ?> />Yes <input name='main_branch' type='radio' value='0' <?php if($restaurant['main...

Radio button's change event doesn't fire in WebKit when using keyboard for input.

Demo: http://jsfiddle.net/55ucw/1/ In any browser other than Safari or Chrome, I can tab into a set of radio buttons and select one using the arrow keys and the change event will fire. In Safari or Chrome, I can tab into a radio group, and select a radio button with arrow keys, but the change event never fires. Am I missing something...

using jquery to disable a series of radio buttons on demand.

I'm trying to accomplish something similar to Wikipedia's History history page, dynamically disabling radio buttons in a series. Ie... if #4 in group two is selected, then 1-4 of group one are disabled, etc. I know how to disable them individually or as a group, but I'm not sure how to do it in a series of say 1-4: Individually: $(...

How to: RadioButton in custom DataGridColumn ItemRenderer in AS3

I have a datagrid that I want to add a column of radio button using AS3 (instead of mxml). I was able to do this with a custom itemRenderer. var dgc:DataGridColumn = new DataGridColumn(); dgc.itemRenderer = new ClassFactory(com.mypackage.RadioBtnColumnItemRenderer); In my RadioBtnColumnItemRenderer.mxml, I have a box with a radioButt...