1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| var url = "http://bar.other/publicNotaries/"
if(XMLHttpRequest)
{
var request = new XMLHttpRequest();
if("withCredentials" in request)
{
// Firefox 3.5 and Safari 4
request.open('GET', url, true);
request.onreadystatechange = handler;
request.send();
}
else if (XDomainRequest)
{
// IE8
var xdr = new XDomainRequest();
xdr.open("get", url);
xdr.send();
// handle XDR responses -- not shown here :-)
}
// This version of XHR does not support CORS
// Handle accordingly
} |
Partager