Bonjour !
voilà j'ai un script qui permet d'ouvrir une fenêtre popup en pleine écran ou bout d'un certain temps.
Mais j'aimerais à la place d'un décompte 5 4 3 2 1 0 redirection.
Mettre plutot un truc du 0 10 20 30 40 50 60 70 80 90 100 % redirection.
ou du genre ..... redirection
voici mon code :
Merci d'avance !
voilà j'ai un script qui permet d'ouvrir une fenêtre popup en pleine écran ou bout d'un certain temps.
Mais j'aimerais à la place d'un décompte 5 4 3 2 1 0 redirection.
Mettre plutot un truc du 0 10 20 30 40 50 60 70 80 90 100 % redirection.
ou du genre ..... redirection
voici mon code :
<html><head><title>Redirection en fonction de la résolution</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
function disp_reso() {
document.write("Vous utilisez une résolution de <B>"+screen.width+"*"+screen.height+"</B>");
}
function InitRedir() {
// Indiquer ici la durée
document.forms[0].elements[0].value=5;
redir();
}
function popup(page) {
// ouvre une fenetre sans barre d'etat, ni d'ascenceur
window.open(page,'popup','width=1280,height=1024,toolbar=false,scrollbars=false');
}
function redir() {
document.forms[0].elements[0].value=document.forms[0].elements[0].value-1;
if (document.forms[0].elements[0].value==0)
{
if (screen.width<800) {window.open(page,'page640','width=1280,height=1024,toolbar=false,scrollbars=false');}
if (screen.width==800) {window.location="page800.html";}
if (screen.width==1024) {window.location="page1024.html";}
if (screen.width==1152) {window.location="page1152.html";}
if (screen.width>1152) {
hauteur=Math.round((screen.availHeight-1024)/2);
largeur=Math.round((screen.availWidth-1280)/2);
window.open("http://127.0.0.1/logiciel/index.php", "page1600", "fullscreen=yes", "toolbar=0,location=0,directories=0,status=0, scrollbars=0,resizable=0,menubar=0");
}
}
else setTimeout("redir()",1000);
}
//-->
</SCRIPT>
</HEAD>
<BODY text="#000000" bgcolor="#FFFFFF" alink="#FF8C00" link="#FF8C00" vlink="#FF8C00" onLoad="InitRedir()">
<FONT FACE="Arial" SIZE='-1' COLOR="navy"><CENTER>
<BIG><B>Redirection selon la résolution</B></BIG><BR><BR>
<BR><BR>
<SCRIPT type="text/javascript"><!--
disp_reso();
//--></SCRIPT>
<FORM>
<BR>Vous allez être <B>redirigé</B> vers la page correspondant à votre résolution <BR>dans
<INPUT type="text" Value="5" size=2> % !
</FORM>
</CENTER>
<BR><BR><BR><BR><BR>
</FONT>
</BODY>
</HTML>
Merci d'avance !