Hello,
I am new to this concept, I have not done much programs on this, but I have a code for you, see if this helps you.
Code:
function getXMLHttpreq()
{
// =======
if ( win.XMLHttpreq ) return new XMLHttpreq();
/ / Internet Explorer
// =================
if ( win.ActiveXObject ) return new ActiveXObject("Microsoft.XMLHTTP");
/ / Not supported
// =============
return null;
}
function appelAjax()
{
htreq = getXMLHttpreq();
if ( htreq == null ) return;
var req = "http://localhost:8080/Site/....";
var par = "action = extract & id = 500";
htreq.open("POST", req, true);
htreq.setreqHeader("Content-type", "application / ......");
htreq.Send(par);
htreq.onhand = Function()
{
if ( parseInt(htreq.readyState) == 4 )
{
var res = htreq.responseText;
}
}
}
Bookmarks