utilise un code ajax qui affiche une iframe différent avec l'ordre différent.
Je ne suis pas un pro dans le domaine mais j'au rai fait un truc dans le genre :
ajax.js :
<!--
function ObjectDiv( div , content )
{
if ( document.getElementById )
{
document.getElementById( div ).innerHTML = content;
}
else
{
if ( document.layers )
{
document.div.innerHTML = content;
}
else
{
document.all.div.innerHTML = content;
}
}
}
function Goto( FILE , METHOD , DATA , div )
{
if( METHOD == 'POST' && DATA != null )
{
FILE += '?' + DATA;
DATA = null;
}
var httpRequestM = null;
if( window.XMLHttpRequest )
{ // Firefox
httpRequestM = new XMLHttpRequest();
}
else if( window.ActiveXObject )
{ // Internet Explorer
httpRequestM = new ActiveXObject( "Microsoft.XMLHTTP" );
}
else
{ // XMLHttpRequest non supporté par le navigateur
return "Votre navigateur ne supporte pas les objets XMLHTTPRequest...";
}
httpRequestM.open( METHOD , FILE , true );
httpRequestM.onreadystatechange = function()
{
if( httpRequestM.readyState == 4 )
{
ObjectDiv( div , httpRequestM.responseText );
}
}
if( METHOD == 'GET' )
{
httpRequestM.setRequestHeader( "Content-type" , "application/x-www-form-urlencoded" );
}
httpRequestM.send( DATA );
}
function ViewContent( div , href , method , data )
{
var wait = "<div align='center'>" +
"<b><font style='color:black;'>Chargement en cours.....</font></b><br><br>" +
"<img src='./loading.gif' border='0' alt='Chargement en cours....'>" +
"</div>";
ObjectDiv( div , wait );
Goto( href , method , data , div );
return false;
}
//-->
index.html :
<html>
<head>
<script type="text/javascript" src="ajax.js">
<title>Choisissez un choix</title>
</head>
<body onLoad="javascript:ViewContent( 'main' , 'odre1.html', 'GET' , null );">
<div id="main" align='center'
style="text-align:center; border:1px hidden #000000; width:500;">
</div>
</body>
</html>
ordre1.html :
<html>
<head>
</head>
<body>
<p>Fruit1</p><br><p>Fruit2</p><br><p>Fruit3</p><br><a href="#" onclick="javascript:ViewContent( 'main' , 'ordre2.html' , 'GET' , null );">Ordre 2</a>
</body>
</html>
ordre2.html :
<html>
<head>
</head>
<body>
<p>Fruit3</p><br><p>Fruit2</p><br><p>Fruit1</p><br><a href="#" onclick="javascript:ViewContent( 'main' , 'ordre1.html' , 'GET' , null );">Ordre 1</a>
</body>
</html>
Dit moi si ça fonctionne, je ne suis pas tou à fait sur...
--------------------------------------
Cordialement, CDD
Si mon message te suffit, merci de l'activer.
[ Lien ]