checkbox not work or no datatable

checkbox not work or no datatable

chiaraebluechiaraeblue Posts: 1Questions: 1Answers: 0
edited October 2023 in Free community support

**Debugger code **:

<script src="../js/jquery-3.2.1.js" type="text/javascript"></script>
<script src="../js/bootstrap.bundle.min.js"></script>
<script src="../js/jquery.dataTables.js"></script>
<script src="../js/dataTables.bootstrap4.js"></script>

<script type="text/javascript">
       function submitAdd(){
         document.forms[0].submit(); 
    }  
    
    $(document).ready(function() {
        $('#tab').DataTable( {
            paging: false,
                    language: {
                        url: '../js/dataTables.Italian.json'
            }
        } );
      });       
</script>
[..]
<s:form action="Add" >
            
       <table class="table table-bordered table-striped table-sm mb-0" id="tab">
             ...
            <s:iterator value="elenco" var="elenco" status="stat">
            <tr>
            <td><input type="checkbox" name="idCheck" value="${ID}"></td>
            ...                         
    </table> ..
<button onclick="javascript:submitAdd();" name="add"> ADD</button> ..

Description of problem: with this situation described it does not report anything in idCheck, while I noticed that by commenting /$('#tabella').DataTable( {.../ the checkbox works, but I lose the datatable with search..

Answers

Sign In or Register to comment.