- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <head>
- <title>ricardo-test</title>
-
- <script type="text/javascript">
- function envoieRequete(url,id)
- {
- var xhr_object = null;
- var position = id;
- if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
- else
- if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
-
- // On ouvre la requete vers la page désirée
- xhr_object.open("GET", url, true);
- xhr_object.onreadystatechange = function(){
- if ( xhr_object.readyState == 4 )
- {
- // j'affiche dans la DIV spécifiées le contenu retourné par le fichier
- document.getElementById(position).innerHTML = xhr_object.responseText;
- }
- }
- // dans le cas du get
- xhr_object.send(null);
-
- }
- </script>
-
- <style type="text/css">
- body
- {
- font-family:Verdana, Arial, Helvetica, sans-serif;
- font-size: 0.8em;
- margin:0;
- padding: 0;
- }
-
- #header
- {
- height: 75px;
- background-color: #99CCCC;
- }
-
- #conteneur
- {
- position: absolute;
- width: 100%;
- height:100%;
- background-color:#D3D3D3;
- }
-
- #centre
- {
- background-color:#9999CC;
- margin-left: 150px;
- }
-
- #gauche
- {
- position: absolute;
- height: 750px;
- background-color: #00CED1;
- width: 150px;
- }
-
- </style>
- </head>
-
- <body>
-
- <div id="conteneur">
- <div id="header">
- </div>
- <div id="gauche">
- <a href="#" onclick="envoieRequete('bande.html','header');" >test</a>
- <a href="#" onclick="envoieRequete('menu.html','centre');" >test2</a>
- </div>
- <div id="centre">
- </div>
- </div>
- </body>
- </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>ricardo-test</title>
<script type="text/javascript">
function envoieRequete(url,id)
{
var xhr_object = null;
var position = id;
if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
else
if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
// On ouvre la requete vers la page désirée
xhr_object.open("GET", url, true);
xhr_object.onreadystatechange = function(){
if ( xhr_object.readyState == 4 )
{
// j'affiche dans la DIV spécifiées le contenu retourné par le fichier
document.getElementById(position).innerHTML = xhr_object.responseText;
}
}
// dans le cas du get
xhr_object.send(null);
}
</script>
<style type="text/css">
body
{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
margin:0;
padding: 0;
}
#header
{
height: 75px;
background-color: #99CCCC;
}
#conteneur
{
position: absolute;
width: 100%;
height:100%;
background-color:#D3D3D3;
}
#centre
{
background-color:#9999CC;
margin-left: 150px;
}
#gauche
{
position: absolute;
height: 750px;
background-color: #00CED1;
width: 150px;
}
</style>
</head>
<body>
<div id="conteneur">
<div id="header">
</div>
<div id="gauche">
<a href="#" onclick="envoieRequete('bande.html','header');" >test</a>
<a href="#" onclick="envoieRequete('menu.html','centre');" >test2</a>
</div>
<div id="centre">
</div>
</div>
</body>
</html>