How to correctly use Bootstrap table data-url property?

Syed Ahmed Jamil picture Syed Ahmed Jamil · Apr 23, 2017 · Viewed 13.6k times · Source

I am trying to figure out how to use the data-url property of Bootstrap table Here is my code. I have added all the necessary CSS/JS files and referenced a correct JSON form file in the the data-url property but still it ain't showing any results. What am I missing here ?

Answer

NovaPenguin picture NovaPenguin · Apr 23, 2017

Look in the network tab in your browser debugger. Most likely you're getting a 400 error because of the Same-origin Policy. The browser can't* request content from a different domain than the one it's hosted on.

*Generally true, there are ways around this.

https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy