XML value from URL to text using Javascript

Saturday, October 3, 2015

I am trying to get a value from this URL (returns pure XML):

http://demo.piwik.org/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=7&period=day&date=today&format=xml&token_auth=anonymous

And I want to store this value in this element on a separate site:


Every javascript or jquery attempt I try results in some “access-control-origin” error, which I understand to a point but I can’t do anything about the remote server. I need a quick front-end solution.

Note: There is another format I can return the data in – JSON. But I have had similar issues above in trying to get that data as well.


0 comments:

Post a Comment