Datatables warning (table id = 'datatables': Requested unknown parameter '0' from the data source

Datatables warning (table id = 'datatables': Requested unknown parameter '0' from the data source

chriscriswellchriscriswell Posts: 4Questions: 0Answers: 0
edited August 2012 in DataTables 1.9
Hello all,

I've read a lot of discussion about the Datatables warning and none of them so far are related to my situation.
The data loads great, without error, in Chrome, FF, Safari. In IE however, I get the standard warning, the data loads, but without the export functionality(oTableTools). I've tried all combinations of aoColumns with the same result. I suspect it has something to do with my foreach() loop using a form tag? I'm datatables in other spots without the need of echo'ing a form tag and IE DOES NOT give an error.

Any tips or guidance would be appreciated :)

LAMP configuration
jquery.js = 1.72
Datatables is 1.92

Initialization script
[code]
$(document).ready(function() {
oTable = $('#datatables').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": 'T<"clear">lfrtip',
"bAutoWidth": false,
"bSort": false,
"oTableTools": {"sSwfPath": "datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"}
} );
} );
[/code]

HTML Portion
[code]
Active Case Load:



Consumer
Service
Evidence Based
Service Location
Time
Date
Submit
Actions




<?php
foreach ($show_c_list as $r) {
echo ' ';
?>
<?=$r['Name'];?>
<?=$show_services; ?>
<?=$show_service_type; ?>
<?=$show_service_location; ?>
<?=$show_time; ?>
<?=$date; ?>

class="edit">Edit

<?php
echo "";
}
?>

[/code]

Replies

  • chriscriswellchriscriswell Posts: 4Questions: 0Answers: 0
    Also, here's the trace.

    http://debug.datatables.net/iwezub
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    >
  • chriscriswellchriscriswell Posts: 4Questions: 0Answers: 0
    Thanks Allan. I suspected it was bad HTML. Last question. Would DataTables Edit work for inserting new records based off existing dataset? For example, I have 30 customer case load. I display the case load and I want the user to be able to add service, service type and time etc. The user would select from drop down boxes... Is this possible in Editor?

    Thanks again for fast response and guidance.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Do you mean like a list? You can use different field types with Editor, including select lists: http://editor.datatables.net/release/DataTables/extras/Editor/examples/fieldTypes.html . So all you need to do is populate the list with the ipOpts argument for the select field.

    What does your SQL structure look like? Is it multiple tables with a link table or something else? Editor 1.2 which will be out at the end of the week provides a nice (imho :-) ) implement ion for working with joined tables if that is important for you.

    Allan
  • chriscriswellchriscriswell Posts: 4Questions: 0Answers: 0
    Allan,
    First, fantastic support.

    The SQL structure is multi table joins stored in functions. So yes, that would be of huge interest :) I'll wait to activate my trial then.

    Cheers
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Super - I'm just about to write up the tutorial on the new Join class :-). If you check back on Friday, the new Editor version should be available then.

    Allan
This discussion has been closed.