Importing Javascript Dataset from Office365

Importing Javascript Dataset from Office365

CarlwCarlw Posts: 4Questions: 1Answers: 0

Hi. I have just started (attempted to start) using DataTables. It does look great, and seems very powerful (you'll understand why it seems in a second).

I get much of the examples, however, not being a coder, I am not even sure where to start to learn how to import my SharePoint Online list data into my GoDaddy site with DataTables.

So this makes sense:

var dataSet = [
    ['Trident','Internet Explorer 4.0','Win 95+','4','X'],
    ['Trident','Internet Explorer 5.0','Win 95+','5','C'],......
]

I have read and understand the JavaScript Dataset example, but where does that array or dataset come from????

Any tidbits to get me going would be much appreciated!!

Cheers

Carl

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,933Questions: 1Answers: 10,352 Site admin

    but where does that array or dataset come from????

    Anywhere you want! In the case of the example you are referring to it is a static array. But you can Ajax load data, which will probably be more useful.

    Have a read through the data source documentation.

    Allan

  • CarlwCarlw Posts: 4Questions: 1Answers: 0

    Thanks Alan, much appreciated. Yes I have reviewed that content and the only thing I can find is:

    "You can instruct DataTables to use data given to it using the dataDT initialisation option. This data can be in the form of arrays, objects or instances (see above) and can be sourced form anywhere you want! As long as Javascript can access the data, you can send it to DataTables (be it from a custom Ajax call, a WebSocket or just a good old fashioned array of data)."

    The examples already have datasets but it still doesn't indicate how that data was obtained in the first place.

    Is it something I need to do outside of DataTables then use DataTables once I've acquired such a dataset?

    The reason I ask is I don't see any reference to connections, just what happens when you have already obtained it. Or am I missing something??

    Thanks

    CW

  • allanallan Posts: 62,933Questions: 1Answers: 10,352 Site admin
    Answer ✓

    Is it something I need to do outside of DataTables then use DataTables once I've acquired such a dataset?

    Correct. As the data can come from absolutely anywhere (a PHP script, a localStorage database, a Google Gears database, Yahoo! Pipes, C# JSON output, Java, plain text file, file upload, Excel sheet - whatever) there is really very little point in me trying to document all of that as it would be impossible! Likewise DataTables itself couldn't possibly interface with every database or data source available. Hence why JSON is the main format that is used.

    It is assumed that you are you able to get the data out of whatever data storage format you are using.

    Allan

This discussion has been closed.