Method 1:
Function gethttp (sid, url ){
Var xmlHttp;
If (window. ActiveXObject ){
XmlHttp = new ActiveXObject ("Microsoft. XMLHTTP ");
}
Else if (window. XMLHttpRequest ){
XmlHttp = new XMLHttpRequest ();
}
XmlHttp. onreadystatechange = function (){
If (xmlHttp. readyState = 4 ){
Document. getElementById (sid). innerHTML = xmlHttp. responseText;
}
}
XmlHttp. open ("POST", url, true );
XmlHttp. send (null );
}
Method 2:
Function gethttp (sid, url ){
If (window. XMLHttpRequest ){
Var req = new XMLHttpRequest ();
If (req. overrideMimeType ){
Req. overrideMimeType (''text/html '');
}
Req. onreadystatechange = function (){
If (req. readyState = 4 ){
If (req. status = 200 ){
Alert (id + "" + req. responseText );
Document. getElementById (sid). innerHTML = req. responseText;
}
Else {
Alert ("Problem with server response:" + req. statusText );
}
}
}
Try {
Req. open ("POST", url, true );
}
Catch (e ){
Alert ("Server Communication Problem" + e );
}
Req. setRequestHeader ("Cache-Control", "no-cache ");
Req. setRequestHeader ("If-Modified-Since", new Date (0 ));
Req. setRequestHeader ("Content-length", url. length );
Req. setRequestHeader ("Connection", "close ");
Req. send (null );
}
Else
If (window. ActiveXObject ){
Try {
Var req = new ActiveXObject ("Msxml2.XMLHTTP ");
Req. setRequestHeader ("Content-Type ",