Click event works first time, but throws errors after that
Click event works first time, but throws errors after that
Here is my code:
[code]
$(function () {
oTable = $('#dataTable').dataTable();
oTable.on("dblclick", "tr", function() {
console.log("Click");
var data = oTable.fnGetData(this);
console.log(data);
var surveyCode = $(this).html();
var surveyId = data[colindex("Id")];
...
[/code]
The first time I click a row, it says "Click" and then prints out the data.
The second time (and any time after that) it throws an error.
Here is the error:
[quote]Uncaught TypeError: Cannot read property 'aoData' of null [/quote]
[code]
$(function () {
oTable = $('#dataTable').dataTable();
oTable.on("dblclick", "tr", function() {
console.log("Click");
var data = oTable.fnGetData(this);
console.log(data);
var surveyCode = $(this).html();
var surveyId = data[colindex("Id")];
...
[/code]
The first time I click a row, it says "Click" and then prints out the data.
The second time (and any time after that) it throws an error.
Here is the error:
[quote]Uncaught TypeError: Cannot read property 'aoData' of null [/quote]
This discussion has been closed.
Replies
Allan