CODE
var xmlhttp;
function loadXMLDoc(url) {
/* Mozilla */
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("HEAD",url,true);
xmlhttp.send(null);
} else
/* IE */
if (window.ActiveXObject) {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp) {
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("HEAD",url,true);
xmlhttp.send();
}
}
}
function state_Change() {
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4) {
if (xmlhttp.status==200) {
document.location.href="toc.html";
// document.getElementById('T1').innerHTML=xmlhttp.getAllResponseHeaders()
} else {
// document.location.href="toc.html";
}
}
}
loadXMLDoc('toc.html');
Thanx for suggestions ppl!
But I found out the way by using javascript XML or whatever its called when I searched for many hours!