views:

64

answers:

1

I d like to execute a remote javascript which redirects the user to another page on my domain with data that s passes as query string. I want to get this data which is passed on to the page on my domain.

        $.getScript('http://site.com/foo.js', function() {
            //foo.js redirects to another page on my domain with data
            // and i d like to capture that data from this function, 
            // at least if i find the parameters that passed on there, i ll be fine.  
        });

What to do ?

http://api.jquery.com/jQuery.getScript/

A: 
GerManson
+1 - Good call emphasizing the other domains bit, indeed you cannot do this, it's called the same-origin policy: http://en.wikipedia.org/wiki/Same_origin_policy
Nick Craver
I m sorry, i appreciate your answer and i know the syntax, but i dont understand why you are giving such an answer. I dont know what to tell you. I m executing the javascript because it s returning data from another company's database, which i dont have access too. simple as that.