Menu
  • HOME
  • TAGS

Custom CSS Checkbox with caption inside

html,css,checkbox

Simplest way - add z-index: -1 for your after-element

Check a checkbox in a table row where a “delete” icon has been clicked on using JQuery

jquery,checkbox

You are doing right . You just need to to do .find() instead of .children() $('.delete').click(function(){ var td = $(this).closest('td'); var chkbox = td.find('.checkbox-select'); chkbox.prop('checked',true); }); .children() would search the immediate descendants. .find() will look into the enite inner nodes...

Angular: ng-repeat depending on state of other object

javascript,angularjs,checkbox,ng-repeat

So your issue here is mostly how to filter values in a repeat based on some external input? One way to do it is to do just that, filter! The standard filter in Angular takes an array and filters out only those entries maching a comparator function. You would do...

aligning hierarchical checkboxes

html,css,checkbox

It should be what you need. See that I removed all your inline styles, you don't need .country-parent and .country-child classes too. If you don't need them to something else, remove them. #CountryList > div is the same as .country-parent from your HTML #CountryList > div > div is the...

Event on dynamically created checkbox asp.net

c#,jquery,asp.net,table,checkbox

you can try this code List<CheckBox> lstChckBox; protected void Page_Load(object sender, EventArgs e) { // you can create controls programaticaly or html page, doesnt important //only you should know controls ID and all controls share same checked event CheckBox chc1 = new CheckBox(); chc1.CheckedChanged += new EventHandler(chck_CheckedChanged); CheckBox chc2 =...

Prevent changing checkbox value [duplicate]

php,checkbox

It is a bit unclear what you ask: php can only handle data on the server side. If you do not want some specific attribute of a dataset you read / write to / from a database to be modified, then just don't do it. No one forces you to...

XPages checkboxgroup and default value

checkbox,xpages

Dan, Two things to try: Easy Fix #1: Change default value to the itemValue. So this in the default value: return "1"; Easy Fix #2: Put code in beforePageLoad to set the default value to the data that it is bound to. For example: If checkbox is bound a viewScope...

Passing checkboxes values to view in django

django,checkbox,django-templates,django-views

views.py if request.method == 'POST': #gives list of id of inputs list_of_input_ids=request.POST.getlist('inputs') Hope this solves pretty much of your problem.Check out this link Checkboxes for a list of items like in Django admin interface ...

Trouble dynamically changing state of checkbox with AJAX

ajax,checkbox,label

I am so sorry to trouble you guys. I feel so stupid. Thank you for your responses. It is working fine now.

JCheckBoxes not being disabled after I setEnable(false) them

java,swing,checkbox,jframe,enable-if

In your limit_checkBoxes() method, you want i < 30, not i > 30 in the loop. See my embedded comment. label.setText(Integer.toString(number_of_boxes_checked)); if (number_of_boxes_checked > 6) { for (int i = 0; i < 30; ++i) { //<- your bug was here, I fixed it checkBox[i].setEnabled(false); } } else { ++number_of_boxes_checked;...

ng-if or ng-checked matching from comma separated value

html,arrays,angularjs,checkbox,angular-ng-if

You can change the csv to an array of number: $scope.csv = [5,6,76,78]; //If you REALLY need it as a string $scope.csv = '5,6,76,78'.split(',').map(Number); Then check the index of id in the html <label ng-repeat="id in ids"> <input type="checkbox" value="{{id.id}}" ng-checked="csv.indexOf(id.id) != -1"> {{id.id}} </label> ...

WPF: Deselect all my Checkbox when one is selected

wpf,listview,checkbox

What about binding the CheckBox's IsChecked property to the ListViewItem's IsSelected property? If SelectionMode is set to Single, then you'll only be able to select one row and one checkbox. <ListView ItemsSource="{Binding Source={StaticResource TestDataSource}}" SelectionMode="Single"> <ListView.View> <GridView> <GridViewColumn Width="30"> <GridViewColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}}" />...

How Jquery get textbox array value when checkbox value checked?

jquery,checkbox,textbox

You don't need to iterate through each textbox since you will have only one textbox and checkbox in each tr. When you check checked property of each checkbox and if it is checked get the textbox value associated with it as below: DEMO function submitbookdata() { var bookidArr = [];...

FX - Suggestions for aligning CheckBox in Grid

java,checkbox,javafx,grid,alignment

I can't see a "nice" way to do what you want: the best I can come up with is to separate the label from the check box, and register a mouse listener with the label to toggle the state of the check box. Maybe someone else can see a more...

How to get checked checkboxes number with JS/HTML?

javascript,html,checkbox

var list = document.getElementsByTagName("input"); var totalchecked = 0; for(var i = 0; i < list.length; ++i) { if(list[i].type == "checkbox") { if(list[i].checked) { ++totalchecked; } } } if(totalchecked > 0) { // do if checked boxes count more than 0 } else { // do if 0 checked boxes }...

Having problems while trying to delete single rows from a custom ToDo list?

android,android-fragments,checkbox,android-studio

You need to assign an onclick listener to your delete button outside of the onChecked statement. Add it in code just after you assign the onClick event to the add button. This is because a view in android can only have 1 listener per event type. The onClick event can...

JavaScript & Checkboxes - More efficient way of storing values of each checkbox?

javascript,jquery,checkbox

You could generate your checkboxes dynamically using an array Modified HTML <form> <div id="checkbox_container"></div> <input type="button" value="open links" id="open_link"/> </form> Modified JavaScript var destinations = [ {'label': 'Checkbox1', 'value' : 'http://www.destinationoflink1.com'}, {'label': 'Checkbox2', 'value' : 'http://www.destinationoflink2.com'}, {'label': 'Checkbox3', 'value' : 'http://www.destinationoflink3.com'} ]; $(function(){ // document onReady for (var i=0; i<destinations.length;...

sortable check boxes with a tag

javascript,jquery,html,jquery-ui,checkbox

When a checkbox changes state, do the following: Get all the IDs of the checked boxes Take these IDs and transform them into a comma-delimited jQuery class selector Hide all a tags, then show the ones that match any of your stored classes $(function() { $('a').hide(); }); $('input[type="checkbox"]').on('change', function() {...

required checkbox group

javascript,jquery,angularjs,checkbox,required

You can try creating a function that determines if any checkbox has been selected: angular('module').controller('MyController', function(){ this.application = { contact: {} }; this.noneSelected = function () { return !(application.contact.relations || application.contact.employees) /* ... */; } } And then on your html: <div ng-controller="MyController as ctrl"> <fieldset class="requiredcheckboxgroup"> <legend>How did you...

Jquery duplicate selected checkbox

javascript,jquery,forms,checkbox

I would suggest adding a blank div at the top <div id="checked"></div> And then on load create a button for each checked input $(function(){ $('input[type=checkbox]').each(function(){ if($(this).attr('checked')=='checked'){ $('#checked').append('<input id="'+$(this).attr('id').substring(6)+'" type="button" value="'+$(this).attr('id')+'">') } }); $('input').on('click',function(){ var i='color_'+$(this).attr('id'); $('#'+i).prop('checked',''); $(this).remove(); }); }); If a button is clicked remove the check and remove itself....

How I disable or uncheck all checkboxes, if one checked in array?

javascript,jquery,checkbox

Since your name attributes contain [], you either need to escape them or switch your single/double quote usage like $('[name="' + $(this).attr("name") + '"].any') $("body").on("change", ".checkbox-inline > input[type=checkbox]", function() { if ($(this).hasClass("any")) { //Any checkbox tick if ($(this).prop("checked")) { //User checked any //Other checkboxes are unchecked $('.checkbox-inline > input[type=checkbox][name="' +...

JQuery in MVC - Send form data as array with getJson

javascript,jquery,asp.net-mvc,checkbox

Lets say you have following HTML - <input type="checkbox" name="chk" value="1" /> 1 <input type="checkbox" name="chk" value="2" /> 2 <input type="checkbox" name="chk" value="3" /> 3 <input type="checkbox" name="chk" value="4" /> 4 <input type="button" id="submit" value="Submit"/> Then we can push the checked checkboxes to an action method using AJAX POST as...

How do I stop the checkbox appearing, so it is slider only

javascript,jquery,html,css,checkbox

Use CSS: .yourSliderClassHere input[type=checkbox] { visibility: hidden; } See the sourcecode on the website you mentioned....

Need to update UI when a checkbox is changed

javascript,jquery,html,twitter-bootstrap,checkbox

There is nothing wrong with your code, here it is working exactly as you describe. Perhaps you have some other code interfering or some special CSS styling on your checkboxes? //Some setup to mimic your code var ra = { active: 'N' }; if (ra.active == 'Y') { $("#userActive").prop("checked", true);...

Innosetup task Page edit

checkbox,task,inno-setup

THIS IS THE ANSWER FOR MY QUESTION THANKS AND CREDIT GOES TO "TLama" Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "My Program" #define MyAppVersion "1.5" #define MyAppPublisher "My Company, Inc." #define MyAppURL "http://www.example.com/" #define MyAppExeName...

How to get value of checkbox in table?

javascript,jquery,table,checkbox

What you have done is right, but you are not outputting it to the table! var table = $("#div_func"); var value_check = ""; for (var i = 1; i < table.rows.length; i++) { if ($('#chk')[i].is(':checked')) { value_check += i + ": " + $('#chk')[i].val(); } } alert(value_check); And you aren't...

Bootstrap Toggle for Checkbox adding extra div

jquery,checkbox,toggle,clone,bootstrap-switch

The problem is that Bootstrap is generating a new "bootstrap-toggle" code inside of the one already existed. So, you need to clone your div without "bootstrap-toggle" code, and then add to it through jquery. Your input should be a normal checkbox (without data-toggle="toggle"): <input id="shippings_hide_1" name="shippings1[hide][]" type="checkbox" value="0" class="hidden"> And...

Angular Show All When No Filter Is Supplied

javascript,angularjs,checkbox,filter

You must return collection first and after you have to check whether is all items removed or not. Filter $scope.filterIndustries = function () { return function (p) { if ($scope.useIndustries.length == 0 && $scope.useTypes.length == 0) { return p; } var isShowAll = true; if ($scope.useIndustries.length > 0) { for...

Laravel 5 not storing checkbox value

php,laravel,checkbox,laravel-5

Have you put the field 'optin' in the $fillable array within the model? Otherwise you cant create a User with 'optin' using the static create method. //File: User.php protected $fillable = ['optin']; ...

Validation on other when more than one checkbox is checked

javascript,jquery,validation,checkbox

Try this : change your button type="button" and call below script. $(function(){ $('.next-page').click(function(){ var checkCount = $('input[name="qual-form-2[]"]:checked').length; //check atleast one checkbox checked if(checkCount > 0) { var checkOther = $('input[name="qual-form-2[]"]:last'); var checkNotOther = $('input[name="qual-form-2[]"]:checked').not(checkOther); //if 'other' and any of the rest is checked show alert if(checkNotOther.length > 0 && checkOther.is(':checked'))...

Selecting and highlight a DataGridView row by checking a checkbox

powershell,checkbox,datagridview

To highlight a row, you just need to set the Selected property to $true: $dataGridView.Rows[$n].Selected = $true To do it when a checkbox is checked, we'll need to add some code to handle the selection when a corresponding event occurs. According to the documentation for the DataGridView.CellClick event (emphasis added):...

How to filter and show only selected items in datagridview?

c#,checkbox,datagridview

The idea is to have a button which when clicked, a loop will be executed over GridView Rows. Within the loop we will check whether the CheckBox for that row is checked, if the CheckBox is checked then the Value from the GridView Row Cell and Cell controls like Label,...

VB.Net: Display total when check boxes are checked

vb.net,visual-studio,checkbox,include

Providing you have TextBox1 as your exp input and two check boxes which are CheckBox1 and CheckBox4 for system and hs respectively and a button to process the input then you can have this code below. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...

Why is this jQuery not working on my Sharepoint page?

jquery,html,checkbox,sharepoint-2010,web-parts

It usually happens when you created elements dynamically. Try this: $(document).on("change", '#ckbxEmp', function () { if ($(this).prop("checked")) { alert("Checked"); } else { alert("Not checked"); } }); Take a look on Direct and delegated events UPDATE: Full code: <script> $(document).on("change", '#ckbxEmp', function () { console.log('Function has been reached'); if ($(this).is(":checked")) {...

Rails 4: Save Checkbox Results to Serialized Array

ruby-on-rails,ruby,ruby-on-rails-4,checkbox,form-helpers

First of all, you mentioned that the column name is channel, but you have used its plural version in Campaign model. Since you are planning to save array of channels in this column, I would suggest you change the name of the column in the database to channels. All the...

android checkbox drawable crashing app

android,checkbox

According to the log Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #15: tag requires a 'drawable' attribute or child tag defining a drawable Change on your checkbox android:background="@drawable/cb_selector"/> for android:button="@drawable/cb_selector"/> Edit: You are right you are using images so you have to change it for android:button="@drawable/cb_selector"/> Be careful with the...

PHP pass value of checkbox to query

php,checkbox,pdo

You cant have same name for multiple inputs if it is not an array, else they will be overwritten by the last one. Try with - <form action="send.php"> <input type="checkbox" name="txt_group[]" value="CID">CID <input type="checkbox" name="txt_group[]" value="OSDS">OSDS <input type="checkbox" name="txt_group[]" value="SGO">SGO <input type="submit"> </form> With php an example query will be...

How do I set the Select All “checkbox” iMacros Without using the button “Play (Loop)”

javascript,select,checkbox,imacros

Maybe this could help you: URL GOTO=javascript:{var<SP>chkBoxes=document.getElementsByName("category[]");for(i=0;i<chkBoxes.length;i++)chkBoxes[i].checked=true;undefined;} ...

Prevent a read-only checkbox from calling a event handler?

jquery,asp.net-mvc,checkbox,checkboxfor

Use :not() like $(document).on('click', '.chkSRSPickup:not([readonly])', function () { ...

Use checkboxes to filter to a new array of objects - javascript

javascript,arrays,function,object,checkbox

You don't need to test if the state changes, because onchange only fires when the state changes. filterByJob just gets the corresponding checkbox element and tests whether it's checked or not. var array = [ {"date":"Jan 1", "job":"teacher"}, {"date":"Jan 1", "job":"lawyer"}, {"date":"Jan 2", "job":"doctor"}, {"date":"Jan 4", "job":"doctor"} ]; var newArray...

Checkbox arrays

javascript,arrays,checkbox

Better give each checkbox input a value, anyway, I'll use id instead. // Listen to all checkboxes $('section input[type="checkbox"]').click(function(e) { var $this = $(e.target); // Find the container of same group. var $parent = $this.parent('section'); // Find all checked ones. var checked = $parent.find('input[type="checkbox"]:checked'); // Map the value or id,...

Multiple checkboxes filtering using filterrific

ruby-on-rails,checkbox,filterrific

Try below in your scope. Before that use '4' instead of 'more' as the value of your last checkbox. ([1, 2, 3, 4] - flag).inject(all) do |x, y| if y == 4 x.where.not("with_bedroom_num_check >= ?", y) else x.where.not(with_bedroom_num_check: y) end end ...

Add and subtract values with jQuery

javascript,jquery,html,checkbox

What I can understand from the question is that you want to subtract the value from total price, but you are accidentally using #TotalValue instead of #TotalPrice when you click on the checkbox, change the code to this, it will work as expected. $('#Cancelation').change(function(){ if($(this).is(':checked')){ total = parseFloat($('#TotalPrice').val()) + Number($(this).val());...

How to change checkbox follow JSON string?

javascript,jquery,ajax,json,checkbox

Add an Id to your checkboxes... <input type="checkbox" class="checkbox1" id="chkApple" name="check[]" />Apple Then check them as follows: success: function (data) { var obj = jQuery.parseJSON(data.d); $("#chkApple").prop('checked', obj[0].Apple > 0); } or better yet, change your Json to use booleans not integers and you get... $("#chkApple").prop('checked', obj[0].Apple); Note that we're using...

Make Check box is checked

php,checkbox

Start Session as <?php session_start(); $session_products = array(); if(array_key_exists("products", $_SESSION)) { if($_SESSION["products"] != null) { $session_products = $_SESSION["products"]; } } ?> Change your code as follows <input name="product[]" type="checkbox" value="1" <?php if(in_array("1", $session_products)) echo "checked='checked'"; ?>/> ...

javascript checkbox check all

javascript,jquery,html,checkbox

I ended up solving it using this. if($("#create-adjustments").is(':checked')) { $("tr").find("td.box").find("div").find("div").prop('class', "switch-on switch-animate"); } else { $("tr").find("td.box").find("div").find("div").prop('class', "switch-off switch-animate"); } ...

WPF Interactions CallMethodAction for DataTemplate in ListCheckBox thrown a exception “Could not find method on object of type”

c#,wpf,xaml,checkbox,listbox

This is probably what you're looking for: public void PropertyUnchecked(object sender, RoutedEventArgs e) { var item = ((ContentPresenter)((CheckBox)e.Source).TemplatedParent).Content as CheckedListItem<TProperty>; } Edit Passing parameters to PropertyUnchecked (e.g. PropertyUnchecked(object customParam, object sender, RoutedEventArgs e)) was not as easy as I expected because CallMethodAction is very strict on certain signatures and does...

how do i make checkboxes like radio button

javascript,jquery,checkbox

Then you use the "radio" attribute. type="radio" And by the way, don't use multiple elements with the same id. Here's how you should do it: <legend>Choose your delivery option!</legend> <label><input type="radio" id="delivery" name="delivery" value="standard" />Standard Delivery</label> <label><input type="radio" id="delivery" name="delivery" value="2day" />2 Day Shipping</label> <label><input type="radio" id="delivery" name="delivery" value="overnite" />Overnight...

with an input checkbox inside a table row, can i add click event to row and still be able to click input

javascript,jquery,html,checkbox

You can use event.stopPropagation() try this:- $('#yes').click(function(e){ e.stopPropagation(); }); Demo...

How to disable checkbox with jquery?

javascript,jquery,checkbox

id should be unique. You cannot have four checkboxes with the same id. You can try other selectors to select the whole range of checkboxes, like .checkbox1 (by class), input[type="checkbox"] (by tag/attribute). Once you've fixed the ids, you could even try #chk1, #chk2, #chk3, #chk4. The snippet below uses the...

if Html.CheckBox is checked or not

javascript,jquery,html,checkbox

Instead of $('#IncreaseStock').val(); You want $('#IncreaseStock').prop('checked') Useful howto blog here: Linky...

How to get collection of ng-model Checkbox in AngularJs?

javascript,angularjs,checkbox,ionic

http://plnkr.co/edit/lOSaa9k7EEpgriz4AmaZ?p=preview HTML <!DOCTYPE html> <html ng-app="app"> <head> <script src="https://code.angularjs.org/1.3.9/angular.js"></script> <link rel="stylesheet" href="style.css" /> <script src="script.js"></script> </head> <body> <h1>Hello Plunker!</h1> <div ng-controller="ctrl "> <input type="checkbox" ng-repeat="field in fields" ng-model="field.checked" ng-checked="field.checked"> {{ field.name }} </input>...

Checkbox exclusion on DIV click

jquery,html,css,checkbox

The event object has a target property which has a reference to the element of event origination (which element was actually clicked). So if the originating element is a checkbox, then you can skip the rest of the event logic, like so: // did not click on a checkbox if(!$(e.target).is(':checkbox'))...

Is there a JSF toggle component or a way to theme an h:selectBooleanCheckbox with images?

jsf,button,checkbox,toggle

I've decided to go with an ICEfaces solution and use their ace:checkboxButton: <ace:checkboxButton value="#{cc.attrs.singleSelect}" styleClass="toggle"> <ace:ajax render="#{cc.clientId}"/> </ace:checkboxButton> You are able to style it to use images: http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=checkboxButtonCustom...

checkbox updating another checkbox on different form

javascript,checkbox

There is no id property for the checkbox elements, also you need to change the assignment to other.checked = original.checked; <form name="A" action="WebPage.php" method="POST"> <input type="checkbox" name="Aa" id="Aa" onchange="update()" value="Aa"/>Aa <script type="text/javascript"> function update(){ var original = document.getElementById('Aa'); var other = document.getElementById('Ba'); other.checked = original.checked; } </script> </form> <form name="B"...

php error in getting multidimensional array through checkbox and textboxes of same row or multiple rows

php,arrays,checkbox,multidimensional-array

You can do it using array_chunk and array_merge_recursive as $array1 = array('first', 'second', 'third'); $array2 = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'); $first = array_chunk($array1,1); $second = array_chunk($array2, 3); foreach($first as $key => $value){ $result[] = array_merge($value,$second[$key]); } print_r($result); Fiddle...

Saving multiple checkboxes using PHP-jQuery to MSSQL Server

php,sql-server,ajax,json,checkbox

I think you are sending the wrong data in your ajax. Try this: jQuery.ajax({ url : "cat-grupos.php", type : "POST",//url:'buscar.php?act=insertar', //async: false, data : { buttonsave : 1, perGrupo : vpGrupo, depGrupo : vdGrupo, selGrado : vsGrado, myCheckboxes : data['cbSeccion-list'] // Array secciones A,B,C,.. }, //rest of ajax The difference...

Sum values of checkbox labels

javascript,jquery,checkbox

Your label doesn't have for attribute, that's why $("label[for='" + this.id + "']") returns blank, and thus .text() returns empty string. You should specify it like this: <input type="checkbox" id="enbapicks-1" name="ENBApicks[1]" value="1" checked> <label for="enbapicks-1">1 Golden State</label> If you can't change HTML, you could get the label from input with...

Three state checkbox plugin with indeterminate state as a question mark

css,twitter-bootstrap,checkbox

You cannot have ? as an alias to null. In simple words, this plugin uses three keywords to determine the three states of the checkbox, namely: Checked: true Unchecked: false Intermediate: null All these do not equate to undefined, which is technically not null in JavaScript and can be used...

Drop-Down-Check-Boxes select un-select malfunction

javascript,c#,jquery,checkbox

I just solved it in case someone has the same problem in aspx part AddJQueryReference should be true <asp:DropDownCheckBoxes CssClass="FreeTextFilterSelection" ID="cbMarket" AddJQueryReference="true" UseSelectAllNode="True" AutoPostBack="true" DataTextField="Text" runat="server" OnSelectedIndexChanged="cbMarket_SelectedIndexChanged" style="height: 19px" > <Texts SelectBoxCaption="" /> </asp:DropDownCheckBoxes> ...

Radio and Checkbox Checked Values Won't Show in JavaScript

javascript,checkbox,radio-button,window.open

the showSize() and the showToppings() methods are both returning true in the end which is why you're getting true in your string. you should return msg and your problem will be solved.

Android onClick checkbox not checked in listview

android,listview,checkbox

Ahhhh I faced same issue :) I solved this thing like below. itemView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub for (int i = 0; i < parent.getChildCount(); i++) { View view = parent.getChildAt(i); CheckBox checkBox = (CheckBox) view .findViewById(R.id.CheckBox); checkBox.setChecked(false); } CheckBox checkBox...

Filtering MySql database with multiple checkboxes in VB.NET

mysql,vb.net,checkbox

Well, since i don't know whats the name of the table field which corresponds to the checkboxes filter criteria, i'm supposing that it is Projects.Sistem I would group all checkboxes into a GroupBox in order to use a For loop to check them all. If any of them is checked,...

How to add checkbox to uicollectionview in swift

swift,checkbox,uicollectionviewcell

Here is the example project available with checkbox cell. (objective - c) MyCell.m // A setter method for checked property - (void)setChecked:(BOOL)checked { // Save property value _checked = checked; // Update checkbox image if(checked) { self.checkBoxImageView.image = [UIImage imageNamed:@"Checked"]; } else { self.checkBoxImageView.image = [UIImage imageNamed:@"Unchecked"]; } } Your...

how to store all checkbox values in array in php

php,arrays,checkbox

You assign a normal string to $days and overwrite it on each iteration. You could append to it, by using the .= operator. ($days .= ' ' . $day), but maybe easier is to use implode: if (isset($_POST['days'])) { $days = implode(' ', $_POST['days']); } else { $days = "not...

Can I uniquely identify 2 check boxes so that I can add a different image to each?

html,css,asp.net,checkbox

Here is an example of what I meant: (Oh and, forgive the images please :) ) #field1,#field2{ display:none; } #field1 + label { padding:40px; padding-left:100px; background:url(http://www.clker.com/cliparts/M/F/B/9/z/O/nxt-checkbox-unchecked-md.png) no-repeat left center; background-size: 80px 80px; } #field1:checked + label { background:url(http://www.clker.com/cliparts/B/2/v/i/n/T/tick-check-box-md.png) no-repeat left center; background-size: 80px 80px; } #field2 + label { padding:40px;...

Binding checkbox to model and check/unchecking it in Angular

javascript,angularjs,checkbox

In my case I have something like this: <li ng-repeat="item in items"> <label> <input type="checkbox" ng-model="item.auto" ng-click="onAutoClick(item)" /> </label> </li> In my controller: $scope.onAutoClick = function(item) { if(item.auto){ // checked (true condition) } else { // unchecked ( false condition) } }; ...

css checkbox checked material design overlay

javascript,jquery,html,css,checkbox

Fork I gave it a shot. Hope it helps. input[type="checkbox"]:checked + label:before { content: '✓'; font-size: 2em; line-height: 53px; text-align: center; display: block; position: absolute; width: 53px; height: 53px; top: 0; left: 0; color: #fff; } Update: Tweaked it a little.. You can set a cool icon to replace the...

AngularJS and checkboxes

angularjs,checkbox

ng-checked will update your IHM on load but clicking on a checkbox will not update your $scope.variables since you do not define them as a model. Just add ng-model to get a two-way data binding and it should works. <div class="checkbox"> <label> <input type="checkbox" ng-checked="photo" ng-model="photo">PhotoGallery</label> </div> <div class="checkbox"> <label>...

HTML, CSS and CheckBoxes

html,css,checkbox

HTML: <center> <form id="pluginsForm"> <div class="squaredOne"> <input type="checkbox" value="Button_1" id="squaredOne" name="check" /> <label for="squaredOne">Button_1</label> </div> <div class="squaredOne"> <input checked="checked" type="checkbox" value="Button_2" id="squaredTwo" name="check" /> <label for="squaredTwo">Button_2</label> </div> <div class="squaredOne"> <input type="checkbox" value="Button_3" id="squaredThree" name="check" />...

Get and display checked checkbox index

javascript,jquery,html,checkbox

You need to use .index(element) to find elements index in the list. $('.day').index(this) If no argument is passed to the .index() method, the return value is an integer indicating the position of the first element within the jQuery object relative to its sibling elements. $(function() { $('.day').on('change', function() { if...

jQuery Validation on checkboxes - parent and child checkboxes

jquery,checkbox,jquery-validate

As others have said the id selector is unique, meaning that when you do $('#box_input') you will only get the first object with id = 'box_input'. I suggest changing id = 'box_input' for class = 'box_input'. You can then add ids to the first parent and its children. Something like...

Filter by checkbox show/hide div link jquery

javascript,jquery,html,css,checkbox

(Demo) You're using a css child selector which will not find the div if it is not a direct descendant of #Categories. This... var selectedDivs = $('#Categories > div').hide(); Should be this... var selectedDivs = $('#Categories div').hide(); Or, to be more specific, you could use this... var selectedDivs = $('#Categories...

Why When I scroll my ListView with CheckBox selected it becomes unselected?

android,listview,checkbox,android-listview

The way the ListView works is that it recycles the same views populated with different data. Hence, the need for the view holder pattern, which it looks like you are using. So, in order for your list to work correctly, you need to save the checked state to your backing...

jQuery (Mobile): get all checked items (checkboxes)

javascript,jquery,checkbox,checked,prop

$(function(){ $('#names input[type=checkbox]').change(function(){ $("#checked").text($('#names input[type=checkbox]:checked').length); }); }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <div id="names"> <label> <input type="checkbox" name="checkbox-0" class="check">Name 1</label> <label> <input type="checkbox" name="checkbox-0" class="check">Name 2</label> <label> <input type="checkbox" name="checkbox-0"...

WPF CheckBox CheckChanged event

c#,.net,wpf,events,checkbox

The check box will show an indeterminate state when IsChecked is set to null. Look at this link for more details. You can write code in indeterminate state like this: <CheckBox Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" Indeterminate="CheckBox_Indeterminate" IsThreeState="True"/> And in the code behind: private void CheckBox_Indeterminate(object sender, RoutedEventArgs e) { //write some code...

Checkboxes will only work on current pagination page in jQuery datatables

javascript,php,jquery,checkbox,datatable

you can get all the selected check box values using following code this might be helpful for you var myArray = []; var id = ""; var oTable = $("#example").dataTable(); $(".class1:checked", oTable.fnGetNodes()).each(function() { if (id != "") { id = id + "," + $(this).val(); } else { id =...

Difference between prop and trigger

jquery,checkbox

Both are completely different Prop is for properties while trigger is for events. when you say $('.mycheckbox').prop('checked',true); the element which matches the selector ".mycheckbox" is obtained and a property checked is set to true. prop deals with HTML properties while coming to trigger it deals with events $('.mycheckbox').trigger('click'); the click...

Select choice based on what's selected (Radio buttons)

javascript,jquery,html,checkbox,radio-button

After looking at the actual problem you are trying to solve, the following will do the lot with hardly any code: $(function () { $('.choicePick, #ads, #__billingCountrySelect__').change(function () { var id = $('#__billingCountrySelect__').val() + ($('#ads').is(':checked') ? "_ADS" : "") + $('.choicePick:checked').val(); $('#' + id).prop('checked', true); }); }); JSFiddle: http://jsfiddle.net/TrueBlueAussie/ag3cwr59/27/ It...

When I click a checkbox in a knockout table row, the tr click event overrides the checkbox state change

javascript,checkbox,knockout.js

I've used an actual checkbox, not sure if this is your requirements or not, anyway this is the column with the checkbox <td> <input type="checkbox" data-bind="checked: Excluded"/> </td> Having a checkbox with checked binding deals with setting the Excluded flag and checking the checkbox at the same time. In the...

how to submit only checked checkboxes

java,javascript,jquery,checkbox,submit

By default only the checked checkboxes are sent. You do need to give the checkboxes a value, for instance value="1". <input type='checkbox' class="urlCheckBox" name='checkbox-1' style='margin-left: 15px; float: left;' value="1"> ...

select all checkbox and have the value of checked checkbox to 'on' jquery

javascript,jquery,html,checkbox

The problem is if ($("input[name='resolution[]']:checked")) {, $("input[name='resolution[]']:checked") will return a jQuery object which will contains all the selected checkboxes with name resolution[] You need $('#res').click(function () { var resolutiontemp = {}; var resolution = []; $("input[name='resolution[]']").each(function () { this.value = this.checked ? 'on' : 'off'; var resolution = $(this).parent().find('span').text(); resolutiontemp[resolution]...

Navigation for slider by checkbox

jquery,checkbox,slider,radio

.next() Description: Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. so your code $('input[type="radio"]:checked').next('input[type="radio"]') will not get the next radio button. you can try : $('.to-right').click(function(){ $('input[type="radio"]:checked').next().next('input[type="radio"]').prop("checked", true);...

How to add checkBox in Dialog and get value?

checkbox,dialog,axapta,x++,dynamics-ax-2012

You can only use typeId (AX 2009 and before) or extendedTypeStr (AX 2012) on extended data types (EDT), not enums like NoYes. It can be used on NoYesId, as it is an EDT. dialog.addFieldValue(typeid(NoYesId), NoYes::Yes, "Check"); You must call run before you can meaningful acquire the value. Dialog dialog =...

select all checkboxes in angularJS

javascript,angularjs,checkbox

You want a function that is launched with the ng-click event on the checkbox. This will also unselect all checkbox too. It iterates through all items, changing the state of each. <input type="checkbox" ng-model="selectAll" ng-click="checkAll()" /> <tr ng-repeat="item in items"> <td> {{item.name}} </td> <td> <input type="checkbox" ng-model="item.Selected" /> </td> </tr>...

Data-binding to ng-model inside of checkbox

javascript,angularjs,checkbox

The code you pasted certainly works, I've verified it here: https://jsfiddle.net/ho8art1t/ checkboxes should be something along those lines: $scope.checkboxes = { a: true, b: false, c: true }; You should either paste the JS that goes with it or just check that your objects are placed similarly as in that...

Check box for Column listview Wpf

c#,wpf,listview,checkbox

You can make the header a custom control by defining it under the GridViewColumn.Header property. <ListView HorizontalAlignment="Left" Grid.Row="1" Width="400"> <ListView.View> <GridView> <GridViewColumn Width="140"> <GridViewColumn.Header> <StackPanel Orientation="Horizontal"> <Checkbox IsChecked="{Binding YourCheckedProperty}" /> <TextBlock Text="Column1" /> </StackPanel> <GridViewColumn.Header> </GridViewColumn> <GridViewColumn Width="140" Header="Column2" />...

Add a “Select All” checkbox to lists of checkboxes that update an array of objects

javascript,jquery,checkbox,d3.js

Got some help off line and the solution for my particular case is below. Realize this was a vague and sprawling question and that the solution that worked for me does directly answer it and does not relate exactly to the code in the question. Considering just deleting this question,...

TextView and Checkbox inside LinearLayout, but Checkbox disappears

android,checkbox,android-linearlayout

try assigning weight to linearlayout and it's children like this: <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:weightSum="1" android:orientation="horizontal" android:layout_alignBottom="@+id/infoinstalacion_fragment1_imgfoto" android:background="@color/transparent"> <TextView android:id="@+id/infoinstalacion_fragment1_nombre_encima_de_imagen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="5dp"...

Javascript - return dynamic row data with checkbox input

javascript,forms,select,checkbox,tabular

You can try something like //use this to store the mapping of values, assuming loadid is unique for each record else a unique property of the record has to be used var watchlogic = {}; var watchLog = new XMLHttpRequest(); watchLog.onreadystatechange = function () { if (watchLog.readyState === 4) {...

Load page and input values

javascript,checkbox

The concept you should read up on is AJAX. It sounds like it would fit your needs: post our data to a script, let the script do it's job, and work with the answer (or completely ignore the answer) Since it seems that you are a beginner, maybe you might...

How to make TDBCheckBox update its DataField immediately after click?

delphi,checkbox,event-handling,delphi-xe3,data-aware

A couple of problems with using the DataChange event to do things like this are that It's called a lot more frequently than you actually need, to react to your DBCheckBox being clicked and Doing a .Post to the dataset is going to change its state, which is generally a...

AngularJS, ng-repeat, checkboxes and toggleAll

angularjs,checkbox,angularjs-ng-repeat,toggle,ionic-framework

Use entry in entries track by entry.id instead of $index. Having 500 entries this improved the stats alot for me: Using track by $index 65.660 ms Scripting 246.985 ms Rendering 129.748 ms Painting 1.23 s Other 3.31 s Idle Using track by entry.id 46.534 ms Scripting 30.827 ms Rendering 17.631 ms Painting 226.515 ms Other 3.18 s Idle ...

Clear the 'All' checkbox when some of the sub-checkboxes have been un-clicked?

c#,.net,winforms,checkbox

You probably should hook into CheckBox.CheckChanged for each checkbox. You actually already have this event handler declared but I don't see where you have any checkbox hook into it. But anyways- just have it check to see if the checkbox is the "all checkbox" and if not, perform the logic...

listview with checkbox get selected row index

c#,wpf,listview,checkbox

Try below sample code. Add a property as below public int Selected { get { return _selected; } set { _selected = value; OnPropertyChanged(new PropertyChangedEventArgs("Selected")); } } public void OnPropertyChanged(PropertyChangedEventArgs e) { if (PropertyChanged != null) { PropertyChanged(this, e); } } Inherit INotifyPropertyChanged into your cs file to get OnPropertyChanged...