bonjour je me demandais si quelqu'un aurais une idée pour changer la fin du script pour naviger avec le centre dans une veuille de style css a la GET merci de votre aide.
voici le script
<title>Sommaire en PHP !</title>
<style type="text/css">
#sommaire
{
position:absolute;
background-color:#CC99FF;
left:10px;
width:560px;
top: 64px;
height: 28px;
}
#page
{
position:absolute;
background-color:#CC99FF;
left : 10px;
width:560px;
height:363px;
top: 93px;
}
</style>
<script type='text/JavaScript'>
var xhr = null;
function getXhr()
{
if(window.XMLHttpRequest)xhr = new XMLHttpRequest();
else if(window.ActiveXObject)
{
try{
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e)
{
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
}
else
{
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
xhr = false;
}
}
function ShowPage(page)
{
getXhr()
xhr.onreadystatechange = function()
{
if(xhr.readyState == 4 && xhr.status == 200)
{
document.getElementById('page').innerHTML=xhr.responseText;
}
}
xhr.open("GET","ajax.php?page="+page,true); // ici a la place j'aimerais faire une class <div class=centre> est mes page ici </div>
xhr.send(null);
}
</script>
merci de votre aide