Author

Topic: Javascript currency conversion tool for Bitcoin merchants (Read 669 times)

member
Activity: 67
Merit: 10
javascript itself doesn like pulling webcontent from remote servers (price ticker api's). the closest you can get simply is by researching AJAX

http://w3schools.com/ajax/ajax_example.asp

I am not pulling remote server content with javascript. That is against the same origin policy. Plus if it were to keep pinging the bitcoincharts API every time someone views a merchant page, bitcoincharts wouldn't be very happy.

The conversion rates are cached. Makes the javascript calls much faster.
legendary
Activity: 4410
Merit: 4788
edit: original comment no longer required. seems he has now got thngs sorted
member
Activity: 67
Merit: 10
Hello everyone,

I recently added BitPay as a payment option to my website.
However I didn't have the ability to easily convert all of my USD prices to Bitcoin automatically.

As a result, I've now built a multiple currency, auto detecting, library which allows you to easily convert your prices to Bitcoin to display to the user quickly.
You can check it out here:
http://www.veniaminilmer.com/jsbitconv
Jump to: