| 12
 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
 56
 57
 58
 59
 
 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
 
function getXhr(){
 
var xhr=null;	
 
if(window.XMLHttpRequest) // Firefox et autres
xhr = new XMLHttpRequest();
else if(window.ActiveXObject){ // Internet Explorer
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e1) {
xhr = null;
}
}
}
else { // XMLHttpRequest non supporté par le navigateur
alert("ATTENTION : \n Votre navigateur ne supporte pas les objets XMLHTTPRequest - installer la dernière version de Microsoft Internet Explorer ou de Mozilla Firefox...\n Your browser don't support XMLHTTPRequest objects - Pleas, install last version of Microsoft Internet Explorer or Mozilla Firefox...");
}
return xhr;
 
}
 
function aff_galeries(GALERIE_NUMBER, baliseDIV){
 
var pageAjax1 = 'http://www.marylincavin.net/aff_galerie8.php?galerie_a_afficher=';
var pageAjax = pageAjax1 + GALERIE_NUMBER;
var baliseDIVaff = baliseDIV;
 
var xhr = getXhr()
// On défini ce qu'on va faire quand on aura la réponse
xhr.onreadystatechange = function(){
// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
 
if(xhr.readyState == 4 && xhr.status == 200){
document.getElementById(baliseDIVaff).innerHTML = xhr.responseText;
}
}
xhr.open("GET",pageAjax,true);
 
xhr.send(null);
}		
</script>
</head>
 
<body onload="aff_galeries('GALERIE1', 'galerie')">
 
<div id="galerie">
<div id="aff_image"><img src="visuels/galerie/100x100.jpg"></div>
</div>
</body>
</html> | 
Partager