suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:114 Uncaught TypeError: Cannot read property 'Url' of undefined
at Object.success (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:114)
at u (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at Object.fireWith [as resolveWith] (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at C (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at XMLHttpRequest.<anonymous> (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
Uncaught ReferenceError: loadData is not defined
at HTMLDocument.<anonymous> (Deliverables.aspx?PageView=Shared&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage:598)
at fire (jquery-1.12.4.js:3232)
at Object.fireWith [as resolveWith] (jquery-1.12.4.js:3362)
at Function.ready (jquery-1.12.4.js:3582)
at HTMLDocument.completed (jquery-1.12.4.js:3617)
Please post a link to your page so we can help debug. Without seeing what you have its impossible for us to help. Otherwise you will need to step through your code to find out where it is failing. The problems you are having right now are not Datatables specific.
@kthorngren I am aware. I just replaced the site name with X because it doesn't matter in JS Bin. You cannot pull from a sharepoint site to a site like that especially with the privacy settings in place
What "appears" with this cdoe. Which code, the test case or your code?
I am creating a new instance of datatable on every iteration
The test case isn't doing that.
Its not clear what the current problem is and what code your are using. If you can't link to a page that reproduces the problems you are having then you need to provide a specific problem description, any errors and the code.
VM49247:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Object.success (Deliverables.aspx?PageView=Shared&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage:575)
at fire (jquery-1.12.4.js:3232)
at Object.fireWith [as resolveWith] (jquery-1.12.4.js:3362)
at done (jquery-1.12.4.js:9840)
at XMLHttpRequest.callback (jquery-1.12.4.js:10311)
Answers
suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:114 Uncaught TypeError: Cannot read property 'Url' of undefined
at Object.success (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:114)
at u (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at Object.fireWith [as resolveWith] (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at C (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
at XMLHttpRequest.<anonymous> (suiteux.shell.crossdomainproxyiframe.3ca8ff8e1e12443e998e.js:93)
Uncaught ReferenceError: loadData is not defined
at HTMLDocument.<anonymous> (Deliverables.aspx?PageView=Shared&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage:598)
at fire (jquery-1.12.4.js:3232)
at Object.fireWith [as resolveWith] (jquery-1.12.4.js:3362)
at Function.ready (jquery-1.12.4.js:3582)
at HTMLDocument.completed (jquery-1.12.4.js:3617)
http://live.datatables.net/beherava/1/edit Here is my JS Bin
And I am positive my urls are correct. At the top of this post my first example, they work like a charm.
Do you want to use a button click to load the data or load it on page load?
I removed (commented out) the button click so the data loads on page load:
http://live.datatables.net/futewesu/1/edit
Kevin
@kthorngren Still the same thing... Nothing loads in the table.
Are you getting the same errors?
Please post a link to your page so we can help debug. Without seeing what you have its impossible for us to help. Otherwise you will need to step through your code to find out where it is failing. The problems you are having right now are not Datatables specific.
Kevin
@kthorngren I cannot "link" you to my sharepoint page? That is why I created the JS Bin
TheJS BIN works but doesn't have access to the URLs. Notice the 404 errors:
Without access to the URLs there is not much more we can do with the JS BIN test case.
Kevin
@kthorngren I am aware. I just replaced the site name with X because it doesn't matter in JS Bin. You cannot pull from a sharepoint site to a site like that especially with the privacy settings in place
@kthorngren It appears with this code, I am creating a new instance of datatable on every iteration
What "appears" with this cdoe. Which code, the test case or your code?
The test case isn't doing that.
Its not clear what the current problem is and what code your are using. If you can't link to a page that reproduces the problems you are having then you need to provide a specific problem description, any errors and the code.
Kevin
This is the code I am using. And now it is returning the data Items to the console but doesn't populate the DataTable still.
Here is what it is returning.
It is all in xml?
Datatables expects JSON data as described here. You will need to convert the XML to JSON.
Kevin
Why don't you have SharePoint return JSON?
@tangerine @kthorngren I thought it already did that as I parsed it in my ajax call?
Now it returns as
But still gives me the same Syntax Error
And I changed the ajax to look like
Please post the full response from the XHR Response tab.
Likely you will need to change
data.data
intable.rows.add( data.data ).
to match the structure of your JSON response.You have posted many errors. Please provide the specific error.
Kevin
@kthorngren tried posting the full results from XHR tab but it will not post to the thread for some reason
Here are all three items returned in the console in the XHR tab
I think your question was answered in your other thread. If not please post your question otherwise we will assume this thread is complete.
Kevin