Today I pose the following problem, I have in the view of my website a table with clients that I pull from the database until there everything is fine, at the same time as the clients I have a checkbox select so that when I want upload a file can select several users to which I'm going to send that file, but when I go through and do a test, it only pulls me first from the list when I select any checkbox in the table, or I select several, in the next I pass the html of the view.
<div class="scroll_vertical">
<table class="table table-bordered table-striped" id="dtDynamicVerticalScroll" >
<tbody id="dtDynamicVerticalScroll">
<tr>
<th ></th>
<th ></th>
@foreach($clients as $client)
</tr>
<tr>
<td><input type="checkbox" onclick="return golbat()" name="checkit" id="cheid"></td>
<td id="clientetd">{{@client}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
in the following the function that you use to see that only one of the list comes out but I want to select all possible ones or just one of any position in the table and send the files to you.
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript">
function golbat(){
var take = document.getElementById("clientetd").innerHTML;
swal("click"+ take);
}
</script>
<script>
$(document).ready(function () {
$('#dtDynamicVerticalScroll').DataTable({
"scrollY": "50vh",
"scrollCollapse": true,
});
$('.dataTables_length').addClass('bs-select');
});
</script>
<style type="text/css">
div.scroll_vertical {
height: 280px;
width: 200px;
overflow: auto;
border: 0px solid #666;
background-color: #ccc;
padding: 2px;
}
</style>