views:

23

answers:

0

Hi-- I'm a bit stumped on what should be a really simple question.

I'm trying to use the Google calculator URL to return a converted currency via ajax, but I can't ever get the data back due to the "same domain" issue I assume.

Here's the code:

window.addEvent('domready', function() {    
            $('currency_select').addEvent('change', function(event) {
                var curr = $('currency_select').value;
                //prevent the page from changing
                //event.stop();

                var url = 'http://www.google.com/ig/calculator?hl=en&q=" . $price . $start_curr . "%3D%3F' + curr;
                var request = new Json.Remote(url, {
                    onRequest: function(){ console.log(url); },
                    onComplete: function(jsonObj) {
                        alert(jsonObj);
                    }
                }).send();
            });
        });

Is there a way to get around this without writing another page to do the request?

Any help appreciated!