Blame view

js/crep.js 426 Bytes
7ab7e900   Jean Wasilewski   file function added
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  function file(fichier)
  {
  	if(window.XMLHttpRequest)
  		xhr_object = new XMLHttpRequest();
  	else if(window.ActiveXObject)
  		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
  	else
  		return(false);
  	xhr_object.open("GET", fichier, false);
  	xhr_object.send(null);
  	if(xhr_object.readyState == 4)
  		return(xhr_object.responseText);
      else
  		return(false);
  }
  
5da68a4a   Jean Wasilewski   Debug of the load...
17
18
19
20
  function loadNewDoc(doc)
  {
  	$("#mainContainer").html(file(doc));
  }