1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
function recup4()
{
var i = "3";
var incid1;
var xhr_object = null;
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
xhr_object.open("POST", http://blabla.com/page.htm, true);
xhr_object.onreadystatechange = function()
{
{
if(xhr_object.readyState == 4)
{
incid2 = xhr_object.responseText;
if (incid2)
{
pos1 = incid2.indexOf("<span class");
if (pos1 != -1)
{
pos1 = incid2.indexOf("\">",pos1);
pos2 = incid2.indexOf(" </span>",pos1);
incid1 = incid2.substring(pos1+2,pos2);
document.Feuille.texte.value="Incident en cours : " + incid1;
}
}
}
}
}
xhr_object.send(null);
} |
Partager