j'ai le code suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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&eacute;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>
qd je choisis l'image par exemple A et que je clique sur résultat, je constate que l'image que j'ai selectionnée c bien l'image A jusqu'à là tt va bien, mais le pb que j'ai c'est que je retourne apres à l'etat initial c-a-d : sur ma page web je retourne sur l'image par defaut pas sur l'image que j'ai choisi (:
Comment je fais pour corriger ça SVPPPPPPP