how to get values on two columns of all checked rows
how to get values on two columns of all checked rows
mynamesefy
Posts: 5Questions: 1Answers: 0
when click button Get it !!! i need to get value from checkbox value and select option value
This question has an accepted answers - jump to answer
Answers
You are calling a function called
putData
in the button's click handler. But I don't see that function anywhere. What have you tried?Allan
i had try this option :
https://live.datatables.net/vebenuhu/2/edit
but this option doesn't fully answer what I want
You'll need to expand on what you are looking for it to do, as I don't quite understand at the moment. The code looks to be working. When you click
#ok
it will check the values for all checkedinput
checkboxes and add them to an array. That is happening (assuming you've got one or more checkboxes checked it will show in the console).If you want the
select
values as well, then you need to fetch them as well.Allan
i don't know how to fetch all values checked input '''tag''' and select
tag
to an multi-dimentional array.because of that, then I tried to replace value all checked checkbox
tag
by combining value checked checkboxtag
value with optiontag
value and then fetch all checked checkboxtag
values to an array.I added a button
Get All
to your test case:https://live.datatables.net/vebenuhu/4/edit
It gets all the checkbox states (true/false) and select values into their own arrays. Is this what you are looking for?
It uses
column().nodes()
andto$()
to get all the jQuery nodes in each column. Loops through them to get the checkbox states and select values.Kevin
your result when click button
Get All
, output :[true, true, true, false, false]
["b", "c", "x", "x", "x"]
i had try it, but that not what im lookin for
i want the output (only for checked checkbox values) :
["
checkboxvalue
+optionvalue
", "checkboxvalue
+optionvalue
", "checkboxvalue
+optionvalue
", etc]should I use
loop
method to combine valuesarray checkboxs
and arrayselect option
?This is one of many ways in which that could be done:
https://live.datatables.net/vebenuhu/5/edit
Allan
Thank you very much Allan