Uncaught TypeError: (intermediate value)[(intermediate value)(intermediate value)(intermediate value

Uncaught TypeError: (intermediate value)[(intermediate value)(intermediate value)(intermediate value

dushe_85dushe_85 Posts: 1Questions: 1Answers: 0

Good afternoon, please can you help me with this problem:

I get this problem recently.

Uncaught TypeError: (intermediate value)[(intermediate value)(intermediate value)(intermediate value)] is not a function.

dataTables.editor.min.js:1

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @dushe_85 ,

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • nomade_5hnomade_5h Posts: 3Questions: 0Answers: 0
    edited September 2018

    Hi @nomade_5h ,

    This looks like a different problem to the OP. For you, it looks like you're not including the DataTables libraries. If you look at the example here, you can see what you need. Also, try running the debugger, this will confirm if libraries are missing.

    Cheers,

    Colin

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    Hi @nomade_5h ,

    Something wonky went on there - your post seems to have been lost with my reply. Hopefully the comment will still make sense to you! :)

    Cheers,

    Colin

  • nomade_5hnomade_5h Posts: 3Questions: 0Answers: 0
    edited September 2018

    Hello, something happened there; I call the linked libraries perfectly:

    localhost:8080/.../.../js/ajax/jquery-3.2.1.min.js"></script>
    localhost:8080/.../.../js/ajax/jquery.min.js"></script>
    localhost:8080/.../.../js/jquery-migrate-1.2.1.min.js"></script>
    .../edit/js/jquery.dataTables.min.js"></script>
    .../edit/js/dataTables.buttons.min.js"></script>
    .../edit/js/dataTables.select.min.js"></script>
    .../edit/js/dataTables.editor.min.js"></script>

    This is the error that comes out now:

    Uncaught TypeError: Cannot read property 'Editor' of undefined
    at Object.success ((index):729)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at A (jquery.min.js:4)
    at XMLHttpRequest.<anonymous> (jquery.min.js:4)

    This is my code:

    editor = new $.fn.dataTable.Editor( {

        table: "#tb_data",
        idSrc:  'codigo_gas',
        fields: [{
                label: "codigo_gas",
                name: "codigo_gas"
            }  ,{
                label: "descrip",
                name: "descrip"
            }, {
                label: "monto",
                name: "monto"
            }, {
                label: "fecha",
                name: "fecha"
            }
        ],
       "ajax": {
    "url": "stock/sis_stock/GETESTA",
     "data": function ( d ) {
        //alert(d);
    
        d.id = dump_index(d.data);
    }
    

    }//fin ajax
    } );
    **
    Note: I was using the trial version and it seemed to be overdue ... there may be something something about that.**

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    localhost:8080/.../.../js/ajax/jquery-3.2.1.min.js"></script>
    localhost:8080/.../.../js/ajax/jquery.min.js"></script>

    Looks like you are loading jQuery twice. This will cause problems. You only want to load it once.

    Kevin

  • nomade_5hnomade_5h Posts: 3Questions: 0Answers: 0
    edited September 2018

    **Ok, I put it like this:

      src="https://code.jquery.com/jquery-3.3.1.js"
      integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
      crossorigin="anonymous"></script>
    
    <!--: DATATABLE EDIT JS  : -->
    
     type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.10.17/js/jquery.dataTables.min.js"></script>
    
     type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
    
    type="text/javascript" language="javascript" src="https://cdn.datatables.net/select/1.2.6/js/dataTables.select.min.js"></script>
    
    type="text/javascript" language="javascript" src="recursos/edit/js/dataTables.editor.min.js"></script>
    
    

    This came out:

    Uncaught TypeError: Cannot read property 'fn' of undefined
        at Object.success ((index):739)
        at fire (jquery-3.3.1.js:3268)
        at Object.fireWith [as resolveWith] (jquery-3.3.1.js:3398)
        at done (jquery-3.3.1.js:9305)
        at XMLHttpRequest.<anonymous> (jquery-3.3.1.js:9548)
    
    Line (739):
    editor = new $.fn.dataTable.Editor( {
    

    Please, what am I doing wrong? :'(

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    You haven't included the Editor JS files. Note, Editor is licensed, so you'll need to either purchase or get a trial first.

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Are you using $.noConflict(); perhaps? If it isn't that can you link to a page showing the issue please?

    Allan

This discussion has been closed.