Bonjour
j'ai une liste de case a cocher créée dynamiquement,l'utilisateur doit cocher sur la liste pour pouvoir suppimer mon probléme est de forcer le client a cocher au moins une case pour que le bouton cancel soit activer sinon le bouton est disabled voici mon code:
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
 
<form  action="cancelDID.php" id="form" name="form" method="post"  >
 
<hr />
<h3 align="center" class="Style9">Cancel Your Private Number(s)</h3>
<hr />
 
<table width="400" align="center">
<?php
$nb_did=( @$_POST["nb_did"] )
       ?  @$_POST["nb_did"]
       :  @$_GET["nb_did"] ;
$submit=( @$_POST["supprimer"] )
             ?  @$_POST["supprimer"]
                         :  @$_GET["supprimer"] ;
for ($i=0;$i<=$nb_did;$i++)
$did[]=@$_POST["did$i"];
 
 
 
require_once('Connections/connex2.php');
mysql_select_db($database_connex2, $connex2);
$insertSQL = sprintf("select yup_number,Nom,prenom,mail from customer where yup_number ='".$_SESSION['numero_orkutel']."' ;");
$query3 = mysql_query($insertSQL,$connex2) or die(mysql_error());
$row3 = mysql_fetch_row($query3);
$insertSQL = "SELECT number,T_references.yup_number,country,city from T_references,command,DID_command where T_references.yup_number='".$_SESSION['numero_orkutel']."' and T_references.yup_number=DID_command.yup_number and T_references.did_reference=DID_command.did_reference and DID_command.id_commande=command.id_commande ";
$query = mysql_query($insertSQL,$connex2) or die(mysql_error());
$row= mysql_fetch_row($query);
if($row){
echo"<table align=center>";
while($row){
 printf("
 <tr valign=baseline>
          <td align=right ><input type=checkbox id =chek name=\"did$i\" value=\"$row[0]\" ></td><td align=left bgcolor=#0055FF class=style11>$row[0]</td>
                   <td align=right bgcolor=#0055FF><input type=text name=country value=\"$row[2]\" readonly class=style11></td>
                   <td align=right bgcolor=#0055FF><input type=text name=city value=\"$row[3]\" class=style11 readonly></td>
          </tr>");
  $i++;
  $row=mysql_fetch_row($query);
  }
 
  printf("<input type=hidden name=\"nb_did\" value=\"$i\">");
}
else{
  print("<script type=\"text/javascript\">
 alert(\"You don't Have any numbers(DIDs) to cancel!.\");
window.close();
</script>");
  //header("Location: adresse.php") ;
    //echo "This is your first order !Please complete the following information.";
  }
 
                 ?>
 
</table>
 
	<div align="center">
    <p align="center">The cancellation of your private number will be effective at the last day of the month.</p>
	<table align="center">
		 <tr align="right">
		 <td align="right" >
 
              <input type="submit" name="supprimer" value="Cancel" align="middle" id="submite"  >
 
                 </td>
	   </tr>
	</table>
	</div>
quelqu'un aurait il un code javascript me permettant de faire ce controle
merci