Parse data from an external JSON source to display in table - Get latest data.

后端 未结 1 2009
有刺的猬
有刺的猬 2021-01-29 05:24

I am currently try to grab the data from http://www.epgpweb.com/guild/us/Caelestrasz/Crimson/

As you can see there is a dropdown menu that shows two different screenshot

相关标签:
1条回答
  • 2021-01-29 05:35

    In general javascript (ajax) cannot make an ajax call to another domain. There are two exceptions JSONP which has to be supported by the domain you're calling, or some browsers will allow a POST but still won't return any external data. Its a security thing.

    If you need to make a javascript/ajax call outside of your domain then you have to create a proxy in your favorite programming language (Java/JSP, PHP, .net, asp). I've posted an answer with an example of Java code for this here:

    jQuery ajax GET returns 405 Method Not Allowed

    Javascript does do a great job with JSON though so I'd suggest setting up your PHP code as a simple pass-through (like the java code in my example), call it from javascript, and deal with the content in Javascript. For instance there is a JQuery pluging called datatables you could use to build the table.

    0 讨论(0)
提交回复
热议问题