Ajax (as an object) form submission breaks when create method unset
Ajax (as an object) form submission breaks when create method unset

editor = new $.fn.dataTable.Editor( {
ajax: {
edit: '/dev/property/cake/admin/attachments/edit/_id_.json',
remove: '/dev/property/cake/admin/attachments/delete/_id_.json'
}, ...
results in... TypeError: opts.url is undefined
on line 3243 (opts.url = opts.url.replace( /_id_/, id );
) of dataTables.editor.js
...which seems to indicate line 3238 (opts = $.extend( {}, opts, ajaxSrc || {} );
) is not correctly identifying the string url of the object. As soon as you add the create method in, it all falls into place and begins working without JS error.
editor = new $.fn.dataTable.Editor( {
ajax: {
create: '/dev/property/cake/admin/attachments/add.json',
edit: '/dev/property/cake/admin/attachments/edit/_id_.json',
remove: '/dev/property/cake/admin/attachments/delete/_id_.json'
}, ...
This discussion has been closed.
Replies
Hi,
I've just posted back about this issue in this thread.
Regards,
Allan
Cheers Allan.