0

I have one wired url!

It can be accessed through browser, but can not be accessed through js or java programming.

If I copy and paste the UR into browser address, browser can get a string be returned, but I can not get it through javascript or java programming.

js code likes following:

var url="http://220.181.61.213/?prot=2&t=0.123123&file=%2Fv%2FHUGE%2FBackUp%2Fhadoop%2F20140118%2F1119469_1554068_v_H_120941_16856%2F1119469_1554068_v_H_120941_16856_001.mp4&new=%2F246%2F85%2FKE78lQ1a8pt6nefyEbSz.mp4";  

    var xhr = new XMLHttpRequest();   
    xhr.onreadystatechange = function(data) {
    if (xhr.readyState == 4) {
        if (xhr.status == 200) {
            alert(xhr.responseText);
        } 
    }
    xhr.open('GET', url, true);
    xhr.send();

No data be returned in above code, and I found NS_ERROR_DOM_BAD_URI when executed in firefox.

What is wrong?

ramaral
  • 6,149
  • 4
  • 34
  • 57

1 Answers1

0

You are trying to do a cross site Ajax request, check out this answer for an explanation:

Cross-Site Ajax Call

Community
  • 1
  • 1
Geezer68
  • 391
  • 2
  • 8