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
| function getData(parent_id) {
getHeader(parent_id);
getContent(parent_id);
}
function getContent(parent_id) {
var width = get_width('ged_title')-150;
if(!parent_id){var parent_id='ged_0';}
if(_xmlHttp&&_xmlHttp.readyState!=0) {
_xmlHttp.abort()
}
_xmlHttp=getXMLHTTP();
if(_xmlHttp) {
_xmlHttp.open("GET","composants/ged/ged.php?parent="+parent_id+"&width="+width ,true);
_xmlHttp.onreadystatechange=function() {
if(_xmlHttp.readyState==4&&_xmlHttp.responseText) {
document.getElementById( 'ged_content' ).innerHTML = _xmlHttp.responseText ;
document.getElementById( 'ged_propriety' ).innerHTML = '' ;
getHeader(parent_id);
if (document.getElementById( 'ged_content' ).offsetHeight > 150) {
document.getElementById( 'ged_arbo' ).style.height = document.getElementById( 'ged_content' ).offsetHeight + "px";
}
else {
document.getElementById( 'ged_arbo' ).style.height = "150px";
}
}
};
_xmlHttp.send(null)
}
}
function getHeader(id) {
var _adresseRecherche = "composants/ged/path.php";
if(_xmlHttpp&&_xmlHttpp.readyState!=0) {
_xmlHttpp.abort()
}
_xmlHttpp=getXMLHTTP();
if(_xmlHttpp) {
_xmlHttpp.open("GET",_adresseRecherche+"?id="+id ,true);
_xmlHttpp.onreadystatechange=function() {
if(_xmlHttpp.readyState==4&&_xmlHttpp.responseText) {
document.getElementById( 'ged_title' ).innerHTML = _xmlHttpp.responseText ;
}
};
_xmlHttpp.send(null)
}
}
var _xmlHttp = null;
var _xmlHttpp = null; |