Search Results

Search found 265 results on 11 pages for 'radiobutton'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • BlackBerry - RadioButtonField, hide border on select

    - by Jessica
    I have a screen with two RadioButtonField objects. By default, the first RadioButtonField shows a rectangle around it to show its selected, and the rectangle moves if you change the selection to the other RadioButtonField or other buttons and textboxes on the page. What I would like to know is...is there a way to hide this border that shows the selection/border?

    Read the article

  • Unselecting RadioButtons in Java Swing

    - by Thomas
    When displaying a group of JRadioButtons, initially none of them is selected (unless you programmatically enforce that). I would like to be able to put buttons back into that state even after the user already selected one, i.e., none of the buttons should be selected. However, using the usual suspects doesn't deliver the required effect: calling 'setSelected(false)' on each button doesn't work. Interestingly, it does work when the buttons are not put into a ButtonGroup - unfortunately, the latter is required for JRadioButtons to be mutually exclusive. Also, using the setSelected(ButtonModel, boolean) - method of javax.swing.ButtonGroup doesn't do what I want. I've put together a small program to demonstrate the effect: two radio buttons and a JButton. Clicking the JButton should unselect the radio buttons so that the window looks exactly as it does when it first pops up. import java.awt.Container; import java.awt.GridLayout; import java.awt.event.*; import javax.swing.*; /** * This class creates two radio buttons and a JButton. Initially, none * of the radio buttons is selected. Clicking on the JButton should * always return the radio buttons into that initial state, i.e., * should disable both radio buttons. */ public class RadioTest implements ActionListener { /* create two radio buttons and a group */ private JRadioButton button1 = new JRadioButton("button1"); private JRadioButton button2 = new JRadioButton("button2"); private ButtonGroup group = new ButtonGroup(); /* clicking this button should unselect both button1 and button2 */ private JButton unselectRadio = new JButton("Unselect radio buttons."); /* In the constructor, set up the group and event listening */ public RadioTest() { /* put the radio buttons in a group so they become mutually * exclusive -- without this, unselecting actually works! */ group.add(button1); group.add(button2); /* listen to clicks on 'unselectRadio' button */ unselectRadio.addActionListener(this); } /* called when 'unselectRadio' is clicked */ public void actionPerformed(ActionEvent e) { /* variant1: disable both buttons directly. * ...doesn't work */ button1.setSelected(false); button2.setSelected(false); /* variant2: disable the selection via the button group. * ...doesn't work either */ group.setSelected(group.getSelection(), false); } /* Test: create a JFrame which displays the two radio buttons and * the unselect-button */ public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); RadioTest test = new RadioTest(); Container contentPane = frame.getContentPane(); contentPane.setLayout(new GridLayout(3,1)); contentPane.add(test.button1); contentPane.add(test.button2); contentPane.add(test.unselectRadio); frame.setSize(400, 400); frame.setVisible(true); } } Any ideas anyone? Thanks!

    Read the article

  • grails set bean value from radio button

    - by Jeff Storey
    I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regardless of if the button is actually clicked by the user or if it is left at its default value? thanks, Jeff

    Read the article

  • Radio Button text

    - by niya
    Trying to create a profile using content provider.I want to add the gender to the table when the radio button corresponding to the male or female is clicked. Any solution?

    Read the article

  • Selecting a radio button when a dropdown value changes

    - by Tim F.
    My setup is something like this: radiobutton1 - selection1 radiobutton2 - selection2 textinput1 I want radiobutton1 to be selected whenever selection1 is changed, and I want radiobutton2 to be selected whenever either selection2 or textinput1 is changed. There has to be a simple javascript solution here... I just can't find it. Here's my actual code ("$semopt" is a string holding the html code for the options on the first selection input): <input type='radio' name='semester' value='existing'/>Existing semester: <select name='sem_id'">$semopt </select><br/> <input type='radio' name='semester' value='new'/>New Semester: <select name='sem_name'"> <option value='Fall'>Fall</option> <option value='Spring'>Spring</option> </select> <input name='sem_year' value='$thisyear' size='5'"/><br/>

    Read the article

  • doubt about radio button mysql php beginner

    - by Marcelo
    Hi, i'm an engineering student and i'm developing a simple software based on html,php and mysql. I learned this topics on w3schools, i know only the basics. I tired to search about this in this website but I thought the doubts about php,mysql, radio buttons but they were much more complex than I need, and that i could understand. Sorry for the english. (Q1)Ex: $email=$_REQUEST['email'] , in this case the input is text, if it where like a radio button for ex: sex: male or female, how would it be? (Q2) what would be the type of this field (for exemple sex in question 1) in the database: text, int, varchar ? thanks for the attention

    Read the article

  • MVVM Group Radio Button

    - by LnDCobra
    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.

    Read the article

  • How to use jQuery to assign a class to only one radio button in a group when user clicks on it?

    - by xraminx
    I have the following markup. I would like to add class_A to <p class="subitem-text"> (that holds the radio button and the label) when user clicks on the <input> or <label>. If user clicks some other radio-button/label in the same group, I would like to add class_A to this radio-button's parent paragraph and remove class_A from any other paragraph that hold radio-buttons/labels in that group. Effectively, in each <li>, only one <p class="subitem-text"> should have class_A added to it. Is there a jQuery plug-in that does this? Or is there a simple trick that can do this? <ul> <li> <div class="myitem-wrapper" id="10"> <div class="myitem clearfix"> <span class="number">1</span> <div class="item-text">Some text here </div> </div> <p class="subitem-text"> <input type="radio" name="10" value="15" id="99"> <label for="99">First subitem </label> </p> <p class="subitem-text"> <input type="radio" name="10" value="77" id="21"> <label for="21">Second subitem</label> </p> </div> </li> <li> <div class="myitem-wrapper" id="11"> <div class="myitem clearfix"> <span class="number">2</span> <div class="item-text">Some other text here ... </div> </div> <p class="subitem-text"> <input type="radio" name="11" value="32" id="201"> <label for="201">First subitem ... </label> </p> <p class="subitem-text"> <input type="radio" name="11" value="68" id="205"> <label for="205">Second subitem ...</label> </p> <p class="subitem-text"> <input type="radio" name="11" value="160" id="206"> <label for="206">Third subitem ...</label> </p> </div> </li>

    Read the article

  • Get table row based on radio button using prototype/javascript

    - by David Buckley
    I have an html table that has a name and a radio button like so: <table id="cars"> <thead> <tr> <th>Car Name</th> <th></th> </tr> </thead> <tbody> <tr> <td class="car">Ford Focus</td> <td><input type="radio" id="selectedCar" name="selectedCar" value="8398"></td> </tr> <tr> <td class="car">Lincoln Navigator</td> <td><input type="radio" id="selectedCar" name="selectedCar" value="2994"></td> </tr> </tbody> </table> <input type="button" value="Select Car" onclick="selectCar()"></input> I want to be able to select a radio button, then click another button and get the value of the radio button (which is a unique ID) as well as the car name text (like Ford Focus). How should I code the selectCar method? I've tried a few things like: val1 = $('tr input[name=selectedCar]:checked').parent().find('#cars').html(); val1 = $("td input[name='selectedCar']:checked").parents().find('.cars').html(); val1 = $('selectedCar').checked; but I can't get the proper values. I'm using prototype, but the solution can be plain javascript as well.

    Read the article

  • How do you use data binding in C# development ?

    - by MemoryLeak
    Recently I use data binding to speed up my development of C# winforms application. But I found that data binding is just useful when the control is Textbox or textare and text kind of controls. If things come to be radio button, image control or datagridview, it's hard for me to use data binding. For example, it's hard for me to bind a group of radio button to a database field. It's hard for me to pre-process the data in database and then bind to datagridview control(I know I can use view to do this, but it is not that convenient) So I really want to know, most of you guys when will use data binding? And how will you use it ?

    Read the article

  • How can I check a radio button on load, based on it's value?

    - by Noor
    I've got the value of a radio button (r1) and I'm trying to use: $("input:radio[val=r1]").attr('checked', true); to check it. The thing is that I've got three radio buttons in a div, when I check one, the value of the checked button gets stored. When I reload the page I want the page to check the radio button that was chosen last. Thanks!

    Read the article

  • C# Help For Adding Radio Button For MenuStrip.

    - by Gayan J
    Im a beginner for C# language.So i need a help from who genius from this scheme.i need to add a radio button for menu strip. i already change "clickonclick" property to "true".but i need a option like radio button selection. you can see it from windows calculator menu bar.(click View) how can i get to it via using menustrip peoperty.

    Read the article

  • radio input replacement using jquery

    - by altvali
    It may seem a bit odd to ask this since there are several solutions out there but the fact is that all of them look pretty and none of what i've seem save the input value for form submission the right way. I'm looking for something that will replace all radio inputs with divs that get special classes when they are hovered or clicked, and an input type hidden for every group of radio inputs with the same name, hidden input that will be updated with the value corresponding to the div the user clicks on. Long sentence, i know. Here's what i've come up with: $('input:radio').each(function(){ if (this.style.display!='none') { var inputName = $(this).attr('name'); var inputValue = $(this).attr('value'); var isChecked = $(this).attr('checked'); if (!$('input:hidden[name='+inputName+']').length) // if the hidden input wasn't already created $(this).replaceWith('<div class="inputRadioButton" id="'+inputName+'X'+inputValue+'"></div><input type="hidden" name="'+inputName+'" value="'+inputValue+'" />'); else{ $(this).replaceWith('<div class="inputRadioButton" id="'+inputName+'X'+inputValue+'"></div>'); if (isChecked) $('input:hidden[name='+inputName+']').attr({'value':inputValue}); } //this bind doesn't work $("#"+inputName+"X"+inputValue).click(function(){ if($('input:hidden[name='+inputName+']').val()!=inputValue){ $('input:hidden[name='+inputName+']').attr({'value':inputValue}); $('div[id*='+inputName+'].inputRadioButton').removeClass('inputRadioButtonSelected'); } if (!$("#"+inputName+"X"+inputValue).hasClass('inputRadioButtonSelected')) $("#"+inputName+"X"+inputValue).addClass('inputRadioButtonSelected'); }); } }); Please tell me how to fix it. Thank you. Edit I've found the reason. It should normally work but some of my radio inputs generated by an e-commerce software had brackets in them (e.g. id[12] ) and jQuery was parsing that. The fix is adding var inputButton = document.getElementById(inputName+"X"+inputValue); before the bind and replacing $("#"+inputName+"X"+inputValue) with $(inputButton).

    Read the article

  • IE6 transparency+radio button can't be clicked

    - by Jonas Byström
    IE6: when I place a partially transparent image in a div, the radio buttons in that div that overlap the non-transparent pixels of the image become unclickable. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style media="screen" type="text/css"> div { position: relative; width: 500px; height: 300px; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Olympic_flag_transparent.svg/200px-Olympic_flag_transparent.svg.png, sizingMethod='crop'); } input { position: absolute; top: 40px; left: 60px; } </style> </head> <body> <div> <input type="radio" value="1" name="1"/> </div> </body> </html> If you test the code, you can also try moving the button from (60, 40) to (40, 40) where the image is transparent, and voilà - the clicking is back in business again. This bug might, or might not, be related to the IE6 links transparency bug, but I'm not knowledgable enough to grasp any resemblence. Have I done something wrong? Or how can I circumvent? Is there some other option apart from removing the _filter:progid?

    Read the article

  • Radiobuttons and jQuery

    - by SnowJim
    Hi, I have the following radiobuttons rendered in MVC : <div class="radio" id="ModelViewAd.TypeOfAd"> <input checked="checked" id="ModelViewAd.TypeOfAd_Ad" name="ModelViewAd.TypeOfAd.SelectedValue" type="radio" value="Ad" /> <label for="ModelViewAd.TypeOfAd_Ad">Annons</label><br> <input id="ModelViewAd.TypeOfAd_Auktion" name="ModelViewAd.TypeOfAd.SelectedValue" type="radio" value="Auktion" /> <label for="ModelViewAd.TypeOfAd_Auktion">Auktion</label><br> </div> Now I need to hide the id=divEndDate element based on the value on the radiogroup. I have tried this : $(document).ready(function () { $("#TypeOfAd_Auktion").click(function () { if ($(this).checked) { $("divEndDate").css("visibility", "visible"); } else { $("divEndDate").css("visibility", "hidden"); } }); $("#ModelViewAd.TypeOfAd_Ad").click(function () { if ($(this).checked) { $("divEndDate").css("visibility", "hidden"); } else { $("divEndDate").css("visibility", "visible"); } }); }); Now one of these are triggered when switching between the radio buttons? How to solve this?

    Read the article

  • Question about Radio button/PHP/MySQL

    - by Marcelo
    Hi, I'm an engineering student and I'm developing a simple software based on HTML, PHP and mysql. I learned this topics on w3schools. I know only the basics. I tried to search about this in this website but I found questions about PHP, MySQL and HTML radio buttons which were much more complex than I need and that I could understand. Sorry for the English. (Q1) Ex: $email=$_REQUEST['email'] , in this case the input is text, if it where like a radio button for ex: sex: male or female, how would it be? (Q2) what would be the type of this field (for exemple sex in question 1) in the database: text, int, varchar ? Thanks for the attention

    Read the article

  • Selections and radioing - JavaScript

    - by Wayne
    I have a list like this: <ul> <li id="adm-thumb" onclick="javascript:addBanner('bowling.jpg');"> <div class="adm-tick"></div> <img src="img/banners/bowling.jpg" /></li> <li id="adm-thumb" onclick="javascript:addBanner('kcc.jpg');"> <div class="adm-tick"></div> <img src="img/banners/kcc.jpg" /></li> <li id="adm-thumb" onclick="javascript:addBanner('paintballing.png');"> <div class="adm-tick"></div> <img src="img/banners/paintballing.png" /></li> </ul> <input id="bannername" type="text" /> When one item is clicked, the value inside the addBanner() will be added to the input field, however, I want one list to be selected (which is done by css to make it look like it has) when it is equal to the value of the input value. If the value is equals to the value in the addBanner value then the clicked item should have a red background. e.g. function addBanner(label) { var Field = document.getElementById('bannername'); Field.value = label; if(Field.value != label) { // I have no idea what to put here } } Something like a div button that acts like a radio button.

    Read the article

  • setAction for NSMatrix Not Working

    - by PF1
    Hi Everyone: I am attempting to call a function when any cell in a NSMatrix instance is selected. I am using the following code in order to accomplish this: [[cellArray objectAtIndex:0] setAction:@selector(testing:)]; [[cellArray objectAtIndex:1] setAction:@selector(testing:)]; However, when I toggle the selection of the two cells, the function isn't run. Is my method of setting the action of each cell incorrect, or is the problem located somewhere else? Thanks for any help.

    Read the article

  • Any way to change the color of a radio button?

    - by Ryan
    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

    Read the article

  • How do I toggle two images using jQuery and radio buttons?

    - by trench
    This isn't pretty, but I think you'll get what I'm trying to do. <label><input name="jpgSel" type="radio" value="0">jpg 1</label><br /> <label><input name="jpgSel" type="radio" value="1">jpg 2</label><br /> <div id="showjpg"></div> and $(document).ready(function() { $("select").change(function () { if ($("jpgSel:checked").val() == 1) { $('#showjpg').attr({ src: 'one.jpg', alt: 'one dot jpg' }); } else { $('#showjpg').attr({ src: 'two.jpg', alt: 'two dot jpg' }); } });

    Read the article

  • odd behavior when checking if radio button selected in jQuery

    - by RememberME
    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('slow');$('#primary_company').find('option:first').attr('selected','selected');" type="radio" name="companyType" id="primary" checked />Primary</label> <label for="secondary"><input onclick="javascript: $('#sec').show('slow');" type="radio" name="companyType" id="secondary" />Subsidiary</label> </p> Then, it suddenly stopped working (or so I thought). I did some debugging and finally realized that it was returning an id of "approved_status". Elsewhere on my form I have a checkbox called "approved_status". I realized that when I originally tested this, I must have testing it on records where approved_status is false. And, now most of my approved_statuses are true/checked. I changed the code to this: var id = $("input:radio[@name='companyType']:checked").attr('id'); alert(id); if (id == "primary") { And it's now properly returning "primary" or "secondary" as the id. So, it is working, but it seems that it's not checking the name at all and now just checking radio buttons. I just want to know for future use, what's wrong with the original code b/c I can see possibly having 2 different radio sets on a page and then my new fix probably wouldn't work. Thanks!

    Read the article

  • jQuery/Javascript problem with IE

    - by Shadyn
    I have two radio buttons each with a unique ID. When one is clicked, I would like to add $10 to a total. When the other is clicked, we go back to the original total price. My jquery looks like this: function check_ceu() { var price = <%= conference_price %>; if($('#ceu_yes').is(':checked')){ $('#total').val(parseFloat(price) + 10) } else{ $('#total').val(price) } } I have this function bound to document.ready (for page refreshes) and also the onchange handler of the radio buttons. In FF and Chrome this works fine. In IE, when the radio button with ID of "ceu_yes" is checked nothing happens, then when clicking back to the other radio button, 10 is added. So in essence, IE has the checkbox functionality reversed. Below is my code for the buttons: <input type="radio" name="ceu" id="ceu_yes" value="1" onchange="check_ceu()" /> $10 <input type="radio" name="ceu" id="ceu_no" value="0" checked="checked" onchange="check_ceu()" /> No, thank you Any ideas on this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >