I want all of the text from this page: http://finance.google.com/finance/info?client=ig&q=NASDAQ:goog as a variable in the JavaScript on my HTML5 page.
Asked
Active
Viewed 41 times
-2
-
Have you tried using an XHR? If so, post your attempt here. – Sacho Nov 09 '14 at 01:29
-
Yes, not sure if I used it properly though... could you give an example? – drmosley Nov 09 '14 at 01:29
-
There's plenty of examples how to use XHR here, e.g. http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery – Sacho Nov 09 '14 at 01:32
-
Tried XHR... got this in the console XMLHttpRequest cannot load http://finance.google.com/finance/info?client=ig&q=NASDAQ:goog. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 500. Menu.html:1 – drmosley Nov 09 '14 at 01:42
-
All the text? If you said all the text right of the `//` I'd say it looks like a job for `JSON.parse()`... – Lori Nov 09 '14 at 03:36
-
See https://code.google.com/p/yahoo-finance-managed/wiki/YahooFinanceAPIs – guest271314 Nov 09 '14 at 04:31