1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <?php
if($_POST['submit'] == '?')
{
$image = $_POST['one'];
echo "$image";
}
?>
<html>
<head>
<title>Menu fixe image... par Graphys</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
// Alternative graphique à l'horrible menu déroulant que le CSS n'a jamais su embellir...
//Une création de Graphys - http://graphys.online.fr
// @+
function Graphys(nom) {
var imgVide="Vide.gif";
var imgA="A.gif";
var imgB="bleu.gif";
var imgC="realise.gif";
var imgD="retard.gif";
var imgH="H.gif";
var src=document.images[nom].src;
src=src.substring(src.lastIndexOf("/")+1);
if (src==imgVide) {
document.images[nom].src=imgA;
document.choice[nom].value="a faire";
}else if(src==imgA){
document.images[nom].src=imgB;
document.choice[nom].value="en cours";
}else if(src==imgB){
document.images[nom].src=imgC;
document.choice[nom].value="réalise";
}else if(src==imgC){
document.images[nom].src=imgD;
document.choice[nom].value="en retard";
}else if(src==imgH){
document.images[nom].src=imgVide;
document.choice[nom].value="Vide";
}
}
function Resultat() {
var Z="Le Choix 1 est : ";
Z+=document.choice.one.value;
alert(Z);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Arial, Helvetica, sans-serif" size="3" color="#000066"><b><i>Remplace
un menu déroulant par une image</i></b></font><br>
<form name="choice" method="post" action="">
<font face="Arial, Helvetica, sans-serif" size="2" color="#003399"><b>Choix
1 :</b></font> <a href="javascript:Graphys('one')"><img id="one" src="Vide.gif" width="29" height="19" border=0 align="absmiddle"></a>
<input type="hidden" name="one" value="Vide">
<b><font face="Arial, Helvetica, sans-serif" size="2" color="#000066"> </font></b>
<input type="submit" value="?" onClick="Resultat()" name="submit">
</form>
</body>
</html> |
Partager