10 examples of 'jquery to get table row values of selected checkboxes' in JavaScript

Every line of 'jquery to get table row values of selected checkboxes' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
23function checkAllCheckboxesInTable( inputId, state ,showSelectAll, _totRows, _rows ){
24 var size = 0;
25 //var tid = ":"+inputId+"_tbl";
26 var tid = inputId+"_tbl";
27 if(state){
28 size = jQuery("table [id$='"+tid+"'] input:checkbox[id$='"+inputId+"_column_ckb']").not("[id$='selectedAllChbx']").attr("checked","on").size();
29 }else{
30 jQuery("table [id$='"+tid+"'] input:checkbox[id$='"+inputId+"_column_ckb']").removeAttr("checked");
31 size=0;
32 }
33
34 if(showSelectAll){
35 if(state && _totRows>_rows ){
36 jQuery("[id$='"+inputId+"_selectedInfoLbl']").show().text("Selezionati "+size+" elementi su "+_totRows+".");
37
38 jQuery("[id$='"+inputId+"_selectAllLink']").show().text("Seleziona tutti i "+_totRows+" elementi");
39 }else{
40 jQuery("[id$='"+inputId+"_selectedInfoLbl']").hide();
41 jQuery("[id$='"+inputId+"_selectAllLink']").hide();
42 jQuery("[id$='"+inputId+"_undoSelectAllLink']").hide();
43 jQuery("[id$='"+inputId+"_selectedAllChbx']").removeAttr("checked");
44 }
45
46
47 }
48
49}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

398function setSelected(val) {
399 var cb=m_tr.find('.mltable_selection_checkbox');
400 if (cb.length>0) {
401 $(cb[0]).prop('checked',val);
402 }
403}
58toggleCheckboxes: function toggleCheckboxes() {
59 var self = this,
60 checkboxes = this.parents('.field:eq(0)').find('.checkbox').not(this);
61
62 if (this.is(':checked')) {
63 checkboxes.each(function () {
64 $(this).data('SecurityAdmin.oldChecked', $(this).is(':checked'));
65 $(this).data('SecurityAdmin.oldDisabled', $(this).is(':disabled'));
66 $(this).prop('disabled', true);
67 $(this).prop('checked', true);
68 });
69 } else {
70 checkboxes.each(function () {
71 $(this).prop('checked', $(this).data('SecurityAdmin.oldChecked'));
72 $(this).prop('disabled', $(this).data('SecurityAdmin.oldDisabled'));
73 });
74 }
75}
3function check_checkbox (checkbox) {
4 if (checkbox.prop('checked')) {
5 checkbox.parents('label.checkbox').addClass('checkbox_state_cheked');
6 } else {
7 checkbox.parents('label.checkbox').removeClass('checkbox_state_cheked');
8 }
9}
78function set_checkbox_value(id, value) {
79 $('#' + id).prop('checked', value);
80}
107function update_checkboxes(event) {
108 // get all checkboxes in the same group
109 var group = $j('#program_form').prop(event.target.name);
110 var seq = parseInt(event.target.getAttribute('data-seq'), 10);
111 _.each(group, function (other) {
112 var other_seq = parseInt(other.getAttribute('data-seq'), 10);
113 // if checked, check all earlier timeslots as well
114 // if not checked, uncheck all later timeslots
115 if (event.target.checked && other_seq <= seq ||
116 !event.target.checked && other_seq >= seq) {
117 other.checked = event.target.checked;
118 }
119 });
120}
212function updateCheckbox() {
213 $('#charts input, #components input, #coords input').each(function () {
214 $(this).attr('checked', $(this).parent().hasClass('checked'));
215 });
216}
77function genCheckboxWithValues(data, disabled) {
78 var checked='';
79 if (data.value != null && data.value === "true") {
80 checked = 'checked';
81 }
82 var content = "<tr>";
83 content += "<td/><td style='padding-right:15px; padding-top:10px;' colspan='2'>";
84 if (disabled == true || data.writable == "false") {
85 content += "<input value=\"true\" name=\"" + Encode.forHtml(data.id) + "\" type=\"checkbox\" disabled=\"true\" "+checked +"/> " + Encode.forHtml(data.name);
86 } else {
87 if(data.required == true) {
88 content += "<input value=\"true\" name=\"" + Encode.forHtml(data.id) + "\" type=\"checkbox\" "+checked +" required/> " + Encode.forHtml(data.name);
89 }
90 else {
91 content += "<input value=\"true\" name=\"" + Encode.forHtml(data.id) + "\" type=\"checkbox\" "+checked +" /> " + Encode.forHtml(data.name);
92 }
93 }
94 content += "</td></tr>";
95 return content;
96}
48function countSelectedCheckboxes(checkboxName) {
49 var total = 0;
50 var selectedCheckBoxes = document.getElementsByName(checkboxName);
51 for (var i = 0; i < selectedCheckBoxes.length; i++) {
52 if (selectedCheckBoxes.item(i).checked) {
53 total += 1;
54 }
55 }
56 return (total);
57}
115function utils_GetTableSelectedRow(tableId) {
116 var rows = $("#" + tableId).find("tr").not(":first");
117 var index = utils_GetTableSelectedRowIndex(tableId);
118 if (index == -1) {
119 return null;
120 }
121 return rows[index];
122}

Related snippets