Datables.js with Ptototype.js Uncaught TypeError: hungarianKey.charAt is not a function

Datables.js with Ptototype.js Uncaught TypeError: hungarianKey.charAt is not a function

Kostya.frKostya.fr Posts: 2Questions: 1Answers: 0

I need to use Datables.js with ptototype.js, but I have an issue with maybe with the scope of how I'm trying to do this.

I read this 2 suggestion for the order of import :
- datatables.net
- stackoverflow.com

but I still have an error Uncaught TypeError: hungarianKey.charAt is not a function when i try to wrap jQuery code :

jQuery.noConflict();
(function($) {
    
    $(document).ready(function() {
        var groupColumn = 1;
        var table = $('#sql_results').DataTable({
            columnDefs: [
                { "visible": false, "targets": groupColumn }
            ],
            order: [[ groupColumn, 'asc' ]],
            paging: false,
            fixedHeader: true
        } );
    } );

})(jQuery);

I import my JS libs here :

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.js"></script>

<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="ws.js"></script>

<script type="text/javascript" src="script.js"></script> 

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    It seems to work okay if I create a little example with it: http://live.datatables.net/jayawori/1/edit .

    Can you update that to show the issue or otherwise link to a page showing the problem so we can debug it please?

    Allan

  • Kostya.frKostya.fr Posts: 2Questions: 1Answers: 0

    I'm sorry, I think I had some old code in cache. It works fine today

Sign In or Register to comment.