S
shotokan99
hi,
i wanted to check if the url is existing using xmlhttprequest. my
browser is firefox. the code goes like this:
window.onload=ini
var xr= new XMLHttpRequest();
function ini(){
xr.open("HEAD",
'http://www.google.com',
true);
xr.onreadystatechange=doit();
}
function doit(){
if(xr.readyState==4){
if(xr.status==200){alert('ok');}
else if(xr.status==404){alert('not ok');}
}
}//doit
upon running it gives me this error msg:
uncaught exception: Permission denied to call method
XMLHttpRequest.open
....what have gone wrong?
tnx.
i wanted to check if the url is existing using xmlhttprequest. my
browser is firefox. the code goes like this:
window.onload=ini
var xr= new XMLHttpRequest();
function ini(){
xr.open("HEAD",
'http://www.google.com',
true);
xr.onreadystatechange=doit();
}
function doit(){
if(xr.readyState==4){
if(xr.status==200){alert('ok');}
else if(xr.status==404){alert('not ok');}
}
}//doit
upon running it gives me this error msg:
uncaught exception: Permission denied to call method
XMLHttpRequest.open
....what have gone wrong?
tnx.