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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
var xhr_object = http_request_object();
xhr_object.open('POST', 'fichier.php', true);
xhr_object.onreadystatechange = function()
{
if ( xhr_object.readyState == 4 )
{
document.getElementById('zone1').innerHTML = xhr_object.responseText;
var xhr_object2 = http_request_object();
xhr_object2.open('POST', 'fichier.php', true);
xhr_object2.onreadystatechange = function()
{
if ( xhr_object2.readyState == 4 )
{
document.getElementById('zone2').innerHTML = xhr_object2.responseText;
var xhr_object3 = http_request_object();
xhr_object3.open('POST', 'fichier.php', true);
xhr_object3.onreadystatechange = function()
{
if ( xhr_object3.readyState == 4 )
{
document.getElementById('zone3').innerHTML = xhr_object3.responseText;
var xhr_object4 = http_request_object();
xhr_object4.open('POST', 'fichier.php', true);
xhr_object4.onreadystatechange = function()
{
if ( xhr_object4.readyState == 4 )
{
document.getElementById('zone4').innerHTML = xhr_object4.responseText;
}
}
xhr_object4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
data4 = 'var=...';
xhr_object4.send(data4);
}
}
xhr_object3.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
data3 = 'var=...';
xhr_object3.send(data3);
}
}
xhr_object2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
data2 = 'var=...';
xhr_object2.send(data2);
}
}
xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
data = 'var=...';
xhr_object.send(data); |
Partager