Onglets intelligents
Onglets intelligents

 

 

 

<script>
function compteur(id)
{
var sFileName = "compteur.asp";
var xml = null;
if(window.XMLHttpRequest)
xml = new XMLHttpRequest();   
else if(window.ActiveXObject)
xml = new ActiveXObject("Microsoft.XMLHTTP");   
else {
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");   
return;   
var urlServeur = document.URL;
var chaine0 = urlServeur.split('eware.dll')[0];
var chaine1 = urlServeur.split('SID=')[1];
var chaine0 =chaine0 +  'CustomPages/Company/';
xml.open("GET", chaine0 + sFileName + "?SID=" + chaine1+"&J=" + sFileName+"&compid="+id , false);
xml.onreadystatechange = function(){   
if(xml.readyState == 4){
var tmp = String(xml.responseText);
if(tmp != 'undefined') {
tmp = tmp.split('<Body CLASS=TOPBODY>')[1];
var arrayAs = document.getElementsByTagName("TD");
var strClick ="";
for (var i=0; i<arrayAs.length; i++){
strClick = String(arrayAs[i].onclick);
if (strClick.search(/Act=184/i)>-1){
arrayAs[i].innerHTML+= '<font color=#00765f;> ('+tmp.split('##')[1]+'/'+tmp.split('##')[0]+')</font>';
}
if (strClick.search(/Act=181/i)>-1){
arrayAs[i].innerHTML+= '<font color=#00765f;> ('+tmp.split('##')[3]+'/'+tmp.split('##')[2]+')</font>';
}
if (strClick.search(/Act=183/i)>-1){
arrayAs[i].innerHTML+= '<font color=#00765f;> ('+tmp.split('##')[5]+'/'+tmp.split('##')[4]+')</font>';
}
if (strClick.search(/Act=185/i)>-1){
arrayAs[i].innerHTML+= '<font color=#00765f;> ('+tmp.split('##')[7]+'/'+tmp.split('##')[6]+')</font>';
}
}
}
}
}
xml.send(null);
}
</script>
<script for=window event=onload>
var arrayAs = document.getElementsByTagName("TD");
var strClick ="";
for (var i=0; i<arrayAs.length; i++){
    strClick = String(arrayAs[i].onclick);
    if (strClick.search(/Act=200/i)>-1){
tmp = strClick.split('Key1=')[1];
id= tmp .split('&')[0];
compteur(id);
    }
}
</script>
Cordialement