java - XMLHttpRequest status is 0 -


i using window.xmlhttprequest. line commands below.

the problem is returning status = 0. checked url right. doing wrong?

var url = "http://177.55.99.146:8080/autenticacao/autentica?arquivo=" + file;  req.open("get", url, true);  req.send(null); 

most of time caused cross-domain request (i assume request cross-domain since specified full url). did use access-control-allow-origin header @ http://177.55.99.146:8080/autenticacao/autentica?

like this:

<?php     header("access-control-allow-origin: http://www.allowed-domain.com"); ?> 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -