| 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
 
 |  
function OAjax()
{
                        var OAjax = null;
				if(window.XMLHttpRequest) // Firefox et autres
				   OAjax = new XMLHttpRequest();
				else if(window.ActiveXObject){ // Internet Explorer 
				   try {
			                OAjax = new ActiveXObject("Msxml2.XMLHTTP");
			            } catch (e) {
			                OAjax = new ActiveXObject("Microsoft.XMLHTTP");
			            }
				}
				else { // XMLHttpRequest non supporté par le navigateur
				   alert("Activer Javascript pour que cela fonctionne");
				   OAjax = false;
				} 
                        return OAjax;
}
 
 
function Ajax_verif_ccf(Id)
{
  if (window.XMLHttpRequest) OAjax = new XMLHttpRequest();
  else if (window.ActiveXObject) OAjax = new ActiveXObject('Microsoft.XMLHTTP'); 
  OAjax.open('POST',"Ccf/Ajax_verif_ccf.php",true);
  OAjax.onreadystatechange = function()
  {
      if (OAjax.readyState == 4 && OAjax.status==200)
      {
          if (document.getElementById) 
          {
              if (OAjax.responseText =='true') { /* OK */
                    document.getElementById('msg').innerHTML=OAjax.responseText;
              }else{                             /* PAS OK */
                    document.getElementById('msg').innerHTML=OAjax.responseText;
              }
          }     
      }
  }
  OAjax.setRequestHeader('Content-type','application/x-www-form-urlencoded');
  OAjax.send('Id='+Id );
} | 
Partager