1

I'm not really sure how to list my ajax/json results in table form. The network tab in Chrome's Developer Tools shows that the api call was made, but was canceled. I'm guessing it is because of the the error I'm getting.

How do I bring the JSON that giant bomb gives me and convert that into a format that dynatable understands?

Here is my javascript so far...

$(document).on('click', '#searchGame', function(){

    var gSearch = $("#gameName").val();
    $('#my-ajax-table').dynatable({
        dataset: {
            ajax: true,
            ajaxUrl: 'http://api.giantbomb.com/search/?api_key=key&format=json&query='+gSearch+'&resources=game',
            ajaxOnLoad: true,
            records: []
        }
    });

And the error:

[Error] TypeError: 'undefined' is not an object (evaluating >'settings.dataset.records.length')

update (jquery.dynatable.js, line 357)

success (jquery.dynatable.js, line 232)

j (jquery-2.1.0.min.js, line 2)

fireWith (jquery-2.1.0.min.js, line 2)

x (jquery-2.1.0.min.js, line 4)

(anonymous function) (jquery-2.1.0.min.js, line 4)

SithToast
  • 77
  • 7

0 Answers0