checkbox

Primefaces ManyCheckbox inside ui:repeat calls setter method only for last loop

删除回忆录丶 提交于 2019-12-13 16:45:24
问题 I have a <p:selectManyCheckbox> inside <ui:repeat> , getting it's items from a List of a certain Object Class (provided by <ui:repeat> -variable) and is supposed to save the chosen items into another List of the same Object Class. But it calls the setter method #{cartBean.setSelectedExtras} only for the last entry (last iteration of <ui:repeat> ). <ui:repeat var="item" value="#{category.items}"> <p:selectManyCheckbox id="extraCheckbox" value="#{cartBean.selectedExtras}" layout="pageDirection"

how to make Checkbox ReadOnly in Web application

﹥>﹥吖頭↗ 提交于 2019-12-13 16:04:08
问题 I have a gridview with a checkbox in every row. When put into Edit mode the Checkbox can be checked/unchecked; but I don't want the checkbox to be editable in any other mode. The user easily might get confused by checked boxes that do not reflect the real values saved back in the database. <asp:CheckBox id="checkboxCustomerRequired" runat="server" Checked='<%# Bind("CustomerRequired") %>' Enabled="false" CssClass="Check"/> Possible workarounds I tried: 1) Setting enabled = false This achieves

WPF c# Checkbox clickable area modification - BATCH

ぃ、小莉子 提交于 2019-12-13 15:07:36
问题 I have about 3000 instances of checkboxes that are styled in a way which you can click the entire row and the state of the checkboxes will change. How do you modify the checkbox so that ONLY the box is click able. I did a good amount of search and arrived at no conclusion. Thanks 回答1: Everything you must do is check which element has been clicked. In the first solution you should check if OriginalSource is BulletChrome and if it is, you should allow CheckBox to change state, by setting: e

Find checkboxes by value with javascript

夙愿已清 提交于 2019-12-13 14:26:28
问题 I have used this JavaScript to find the checkboxes I need and check them. <script type="text/javascript"> function checkAll(c) { var chks = document.getElementsByName(c.name); for (var i = 0; i < chks.length; i++) { chks[i].checked = c.checked; } } But I cannot use that anymore and wonder if I could find them by their value names, lets say I have 3 checkboxes that are rendered like this.. <input name="2" type="checkbox" value="chk2" onclick="checkAll(this)"> <input name="3" type="checkbox"

Change cell value if checkbox selected - dhtmlxGrid in RoR

我的梦境 提交于 2019-12-13 14:12:50
问题 I'm using dhtmlxGrid on RoR. I have a checkbox and an event "onCheck" that gets activated each time the checkbox is checked. <script type="text/javascript" charset="utf-8"> var grid = new dhtmlXGridObject("grid_here"); grid.setImagePath("/images/dhtmlx/imgs/"); grid.setHeader("Result, PatientID, Approved, Status, Approved Date"); grid.attachHeader("#text_filter,#text_filter,#text_filter,#text_filter,#text_filter"); grid.setColTypes("txt,ed,ch,co,ed"); grid.setColSorting("str,str,str,str,date"

jquery: check and disable checkbox on checking another checkbox

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 13:25:46
问题 I have some divs. Each of them contains two checkbox (each checkbox is in a div of a same class 'class3'). I would that when the user checks the first checkbox, the second one is checked and disabled. I've tried with : $('.class1').live('click', function () { var n = $(this).siblings('input:checkbox'); if ($(this).attr('checked')) { n.attr('disabled', true); } else { n.attr('disabled',false); } return false; }); In this way the two checkbox are enabled, but when I click on the first one, the

How to change color of checkbox label while toggling checked/unchecked state on click

爷,独闯天下 提交于 2019-12-13 13:23:33
问题 I'm trying to change the font color and background color of my checkbox label when I check or uncheck. I found a javascript solution on this site but haven't been able to make the code to work. Here is what I've tried so far. Right now it is attaching the "highlight" class to the parent div and I only want the label to change. Thanks for your time. HTML : <div class="checkboxes"> <input type="checkbox" name="1" id="option one" value="orange"><label for="1" class="highlight">Orange</label>

set checkboxes checked based on user input

老子叫甜甜 提交于 2019-12-13 13:09:05
问题 I have these HTML elements: <div> <form> <div class="form-group"> <label class="control-label"></label> <input type="text" value="1100" class="myCars"> </div> </form> <form> <div class="form-group"> <label class="control-label"></label> <input type="text" value="0011" class="myCars"> </div> </form> </div> Here are my checkboxes: var elem = $('.myCars'); var car = ['car1', 'car2', "car3", "car4"]; var container = '<ul class="cars">'; for (i = 0; i < car.length; i++) { container += '<li>' + '

Find checkbox and textbox placed inside gridview using javascript

谁说我不能喝 提交于 2019-12-13 13:02:43
问题 I want to get the value of check box placed inside grid view. if check box is checked, it textbox in that row should be enable and if it is again uncheked, the textbox should get clear and disabled. I asked this question few hours back but still didn't get satisfactory answer. I tried like this. //My grid code. <asp:GridView ID="DeptGrid" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundField DataField="DeptId" HeaderText="ID"/> <asp:BoundField DataField="DeptName" HeaderText=

Get a proper way to design the checkbox without being followed by a label tag

一世执手 提交于 2019-12-13 11:50:43
问题 I use some CSS to redesign my checkboxes in ASP.NET: input[type=checkbox] { display: none !important; cursor: pointer; } input[type=checkbox]:not([disabled]) + label { cursor: pointer; } input[type=checkbox] + label:before { position: relative!important; padding-right: 3px; top: 1px; font-family: 'Arial' !important; font-style: normal; font-weight: normal; content: "O"; color: #333; } input[type=checkbox]:checked + label:before { content: "X"; color: #ffa500; } <input type="checkbox" id=