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

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -