Bilgin Kılıç
Bilgin Kılıç

Reputation: 9129

getting data using javascript

how can I get this exchange rates from a web service using htm and javascript?

alt text

Dictionary Türkiye = Turkey | Dünya = World | Son güncellenme = Last updating date

Upvotes: 1

Views: 1047

Answers (2)

Mic
Mic

Reputation: 25174

The european bank delivers a free daily exchange rates url for the most common currencies traded against the EURO. The format is XML.

http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

You have to make a page on your server that will call the xml above parse it and return the values.

There is a PHP example of such page at: http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
The output of the example is text, but I guess sending a JSON instead would be easier to handle with javascript on the browser.

Upvotes: 1

Nik
Nik

Reputation: 2726

If you find an exchange rate webservice to call, you'll need to set up a proxy service in your own website to call it, and return that data via json to your page. Easist way to get that json data onto your page is probably to use jQuery.

Upvotes: 1

Related Questions