Editor throws error upon hitting "edit":

Editor throws error upon hitting "edit":

MattCMattC Posts: 10Questions: 0Answers: 0
edited August 2012 in General
I'm just getting my feet wet with the editor (1.2.0). I am trying to get the simplest example running, the one using TableTools.

I get a nice lightbox with the Add and Delete button clicks. But the Edit button fails when clicked, I get the error:

Uncaught TypeError: Object # has no method 'replace'

I'm wondering if I missed adding a script, or maybe my jQuery is too old (1.4.4). Here's a Chrome stack trace, and my scripts and init code is below.

Uncaught TypeError: Object # has no method 'replace' jquery-1.4.4.min.js:104
t.querySelectorAll.k jquery-1.4.4.min.js:104
c.fn.extend.find jquery-1.4.4.min.js:108
j.$ jquery.dataTables.min.js:100
j._ jquery.dataTables.min.js:100
f.edit dataTables.editor.min.js:31
o.TableTools.l.editor_edit.d.extend.fnClick dataTables.editor.min.js:54
TableTools._fnTextConfig TableTools.min.js:51
c.event.handle jquery-1.4.4.min.js:67
c.event.add.h.handle.o jquery-1.4.4.min.js:60

I'm sure it's something boneheaded I'm doing, but maybe what it is will leap out for someone.

Matt

P.S. Also, maybe this is similar to ecostellos question below?

[code]










var dtFind;
var dteditor;

$(document).ready(function () {

dteditor = new $.fn.dataTable.Editor({
"ajaxUrl": "php/MWCTODO.browsers.php",
"domTable": "#find_table",
"fields": [{
"label": "Browser:",
"name": "browser"
}, {
"label": "Rendering engine:",
"name": "engine"
}, {
"label": "Platform:",
"name": "platform"
}, {
"label": "Version:",
"name": "version"
}, {
"label": "CSS grade:",
"name": "grade"
}]
});

dtFind = $('#find_table').dataTable({
"bFilter": false,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [] }
],
"iDisplayLength": 25,
"aaSorting": [],
//using sDom enables the buttons, but hides the record_count_show dropdown.
"sDom": 'Tfrtip',
"oTableTools": {
"sRowSelect": "multi",
"aButtons": [
{ "sExtends": "editor_create", "editor": dteditor },
{ "sExtends": "editor_edit", "editor": dteditor },
{ "sExtends": "editor_remove", "editor": dteditor }
]
}
});

});


[/code]

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I'm afraid I'm not sure what is causing this. Are you able to link me to your example, or give me the error message from Editor when using the unminified version - its difficult to tell what is triggering the error from the min version!

    Thanks,
    Allan
This discussion has been closed.