IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Vérifier un bouton radio (pas de passage dans la condition)


Sujet :

JavaScript

  1. #1
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut Vérifier un bouton radio (pas de passage dans la condition)
    Bonjour à tous,

    J'ai cherché réponse à ma question sur le forum sans succès alors je m'en remet à vous. Ca doit vraiment être tout bête. En fait j'ai une liste de produit, j'en choisis un ( je clique sur un bouton radio à côté du produit voulu) ensuite je clique sur le bouton VOIR qui me permet d'aller dans une fiche du produit contenant des informations détaillées.

    jusque ici tout marche, mais je veux créer une condition dans mon javascript et là ça coince. Voila la fonction ( si je clique sur VOIR j'ai l'alerte peu importe si j'ai cocher ou non mon bouton radio) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    function action_voir()
    			{
    				if(document.getElementById('id_modif').checked==true)
    				{
    					document.getElementById('idaffichage').action='ficheproduit.php';
    					document.getElementById('idaffichage').submit();
    				}
    				else
    				{	
    					alert("Vous n'avez pas sélectionné de produit !");
     
    				}
    			}
    Voila mon soucis, merci d'avance.

  2. #2
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Billets dans le blog
    20
    Par défaut
    On peut voir le HTML associé ?
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

  3. #3
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut Code :
    Voila le code html :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <input type='button' class="boutton" name='Voir Produit' id='id_voir' value='Voir' onclick='action_voir();' />
    puis le bouton radio :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <input type='radio' name='modifproduit' id='id_modif' value='<?php echo($line_aff["Reference"]) ?>'></td>
    C'est bien ça que vous vouliez voir ?

  4. #4
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Bonsoir,

    Tu peux nous montrer un peu plus sur ton code html généré mais le php. J'ai peur que tu as des radio avec le même id.

    A+.

  5. #5
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    je n'ai qu'un seul bouton radio

  6. #6
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Citation Envoyé par egs1989 Voir le message
    je n'ai qu'un seul bouton radio
    Pourquoi utiliser un radio button mais pas un checkbox dans ce cas

  7. #7
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    Bonsoir à everyBODY
    est ce que ta FORM à au moins comme ID idaffichage?

  8. #8
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    Oui ma form s'apelle idaffichage, pour la checkbox, je ne l'utilise pas, je sélectionne mon produit dans ma liste (tableau) avec un boutton radio ensuite je clique sur le boutton voir. Au pire je pourrai utiliser un icone pour voir ??
    On peux utiliser un onclick sur une icone ?

    Merci de votre aide

  9. #9
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Tu peux nous montrer le code de ton formulaire ?

  10. #10
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    voila le code du formulaire :

    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
     
     
    <form id="idaffichage" method="post" action="modifproduit.php">
    					<?php
                                                    $query_aff="select Reference, produit.NumDepart, produit.NumCategorie, Designation, LibelleDepart, LibelleCategorie, CoeffMarge, Prixunit, QuantiteStock        
                                                                    from produit ,departement , categorie
                                                                    where produit.NumDepart = departement.NumDepart
                                                                    and produit.NumCategorie=categorie.NumCategorie";
     
                                                    if(!empty($_POST['listedepart']) && $_POST['listedepart']!="c1")
                                                    {
                                                            $query_aff=$query_aff." and produit.Numdepart='".$_POST['listedepart']."'";
                                                    }
     
                                                    if(!empty($_POST['listecategorie']) && $_POST['listecategorie']!="c1")
                                                    {
                                                            $query_aff=$query_aff." and produit.NumCategorie='".$_POST['listecategorie']."'";
                                                    }
     
                                                    if(!empty($_POST['designation']))
                                                    {
                                                            $query_aff=$query_aff." and Designation like '%".$_POST['designation']."%'";
                                                    }
                                                    
                                                    $query_aff=$query_aff." order by Designation";
                                                    
                                                    $result_aff=mysql_query($query_aff) or die("La requète aff a échouée");
                                            ?>
     
    					<table>
    						<?php
                                                    if(mysql_num_rows($result_aff)==0)
                                                    {                                               
                                                            ?><span class="erreur"> ERREUR : Il n y a aucun produit correspondant à votre recherche !</span><?php
                                                    }
                                                    else
                                                    {
                                                            ?>
    							<tr><th>Désignation</th><th>Libelle Département</th><th>Libelle Catégorie</th><th>CoeffMarge</th>
    							<th>Prix unitaire</th><th>Quantité en Stock</th><th>Choix</th></tr>
    							<?php
                                                            for($i=0; $i<mysql_num_rows($result_aff); $i++)
                                                            {
                                                                    $line_aff=mysql_fetch_array($result_aff);
                                                                    echo "<tr><td>".$line_aff["Designation"]."</td><td>".$line_aff["LibelleDepart"]."</td>
                                                                    <td>".$line_aff["LibelleCategorie"]."</td><td>".$line_aff["CoeffMarge"]."</td><td>".$line_aff["Prixunit"]."</td>
                                                                    <td >".$line_aff["QuantiteStock"]."</td>";
                                                                    ?>
     
    								<td>
    								<input type='radio' name='modifproduit' id='id_modif' value='<?php echo($line_aff["Reference"]) ?>'></td>
    								</tr>
    								<?php
                                                            }
                                                    }
                                                    ?>
     
    					</table>
    				</form>

  11. #11
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 198
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 198
    Par défaut
    merci de mettre le code généré et non le PHP, click droit, afficher la source...

  12. #12
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    Que voulez-vous voir exactement?

  13. #13
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Le code source qui est dans ton navigateur. Comme disait NoSmoking

  14. #14
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    ça risque d'être assez long, je vous donne toute la page ?

  15. #15
    Expert éminent

    Avatar de vermine
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    6 582
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2008
    Messages : 6 582
    Par défaut
    Si vous parvenez à extraire la partie qui nous concerne, c'est mieux. Mais n'extrayez pas trop non plus car il ne faudrait pas perdre des informations.

  16. #16
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    j'ai pensé à une autre solution, car ce n'est pas grave si cette méthode ne fonctionne pas.

    A terme, je voudrais remplacer mon bouton radio et mon bouton VOIR par un seul élément, j'ai pensé à une image clicable mais comment est ce que je pourrais attribuer une valeur à l'image ? Ensuite avec le onclick je changerais de page et je pourrais peut être utilisé mon "alert()" sans soucis ?

  17. #17
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Bon , un saint esprit est venu en moi , j'ai eu le courage de lire ton code PHP .
    Tu n'aurais pas un id qui se répète ici par hasard
    for($i=0; $i<mysql_num_rows($result_aff); $i++)
    {
    $line_aff=mysql_fetch_array($result_aff);
    echo "<tr><td>".$line_aff["Designation"]."</td><td>".$line_aff["LibelleDepart"]."</td>
    <td>".$line_aff["LibelleCategorie"]."</td><td>".$line_aff["CoeffMarge"]."</td><td>".$line_aff["Prixunit"]."</td>
    <td >".$line_aff["QuantiteStock"]."</td>";
    ?>

    <td>
    <input type='radio' name='modifproduit' id='id_modif' value='<?php echo($line_aff["Reference"]) ?>'></td>
    </tr>
    <?php
    }

  18. #18
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    Personnellement, même en lisant je vois pas le soucis. Si tu aurais une idée sur ma solution du dessus peut-être que l'on résoudrais le problème plus facilement ?

  19. #19
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Par défaut
    Citation Envoyé par egs1989 Voir le message
    Personnellement, même en lisant je vois pas le soucis. Si tu aurais une idée sur ma solution du dessus peut-être que l'on résoudrais le problème plus facilement ?
    Si tu nous montres pas le code HTML généré, tu dois faire comme moi aussi, attendre le Saint Esprit .
    Sinon essaye de concaténer les id avec un entier qui s'incrémente (la variable i).

  20. #20
    Membre habitué
    Profil pro
    Inscrit en
    Février 2011
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 13
    Par défaut
    ok j'ai compris mon problème, ayant plusieurs lignes dans mon tableaux, j'ai plusieurs boutons radio, et en fait mon script marche pour le premier mais pas pour les autres.

    Voila le code, vous n'aurez pas à attendre le saint-esprit. par contre c'est très très imposant je vous ai enlever quelque résultat :

    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
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
     
    <script type="text/javascript">
     
     
     
    			function action_voir()
     
    			{
     
    				//if(document.getElementById('id_modif').checked==true)
     
    				//{
     
    					document.getElementById('idaffichage').action='ficheproduit.php';
     
    					document.getElementById('idaffichage').submit();
     
    				//}
     
    				//else
     
    				//{	
     
    				//	alert("Vous n'avez pas sélectionné de produit !");
     
     
     
    				//}
     
    			}
     
     
     
    		</script>
     
    <div id="corps">
     
    			<div class="element_corps">
     
     
     
    				<form action="gestionproduits.php" method="post">
     
    					<label for="text">Désignation</label>
     
    						<input type="text" name="designation" id="id_designation" rows="1" cols="30"/>						
     
     
     
     
     
    					<span class="marge"><label for="idliste">Département</label></span>
     
    					<select name="listedepart" id="idlistedepart" size="1">
     
    						<option value="c1">Tous</option>
     
    							<br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="50">Cablage</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="30">Composants</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="60">Consommables</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="20">Imprimantes</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="80">Maintenance</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="10">PC/PCportable</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="40">Périphérique</option><br /> 
    <b>Notice</b>:  Undefined index: listedepart in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>64</b><br /> 
    <option value="70">Services</option>					</select>
     
     
     
     
     
    					<p  style="float:right">
     
    					<label for="idcategorie">Catégorie</label>
     
    					<select name="listecategorie" id="idlistecategorie" size="1">
     
    						<option value="c1">Tous</option>
     
    						<br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="18"> Accessoire</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="26"> Alimentation</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="01"> Boitier</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="05"> Cablage</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="07"> Carte graphique</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="08"> Carte mère</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="09"> Carte PCI/Réseau</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="17"> Cartouche</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="21"> CD/DVD</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="13"> Clavier/Souris</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="16"> Consommable divers</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="25"> Disque dur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="14"> Imprimante</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="12"> Lecteur/graveur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="02"> Logiciel</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="10"> Mémoire</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="23"> Moniteur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="15"> Onduleur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="04"> Pc</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="03"> Portable</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="11"> Processeur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="22"> Réseau/Modem</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="19"> Sacoche</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="27"> Sauvegarde</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="24"> Support refroidissement</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="20"> Ventilateur</option><br /> 
    <b>Notice</b>:  Undefined index: listecategorie in <b>C:\wamp\www\magasin\gestionproduits.php</b> on line <b>91</b><br /> 
    <option value="06"> Webcam</option>	
     
    					</select>
     
    					</p>
     
    					<br /><br />
     
    					<p class="center">
     
    						<label for="id-sub"></label>
     
    						<input type="submit" class="boutton" name="Rechercher" id="id_sub" value="Rechercher"/>
     
     
     
    						<label for='id_affich'></label>
     
    						<input type='button' class="boutton" name='Voir Produit' id='id_voir'
     
    						value='Voir' onclick='action_voir();' />
     
    					</p>
     
     
     
    				</form>
     
    				<br/>
     
     
     
    				<form id="idaffichage" method="post" action="modifproduit.php">
     
     
     
    					<table>
     
    													<tr><th>Désignation</th><th>Libelle Département</th><th>Libelle Catégorie</th><th>CoeffMarge</th>
     
    							<th>Prix unitaire</th><th>Quantité en Stock</th><th>Choix</th></tr>
     
    							<tr><td>5.1 PCi</td><td>Composants</td>
     
    								<td>Carte PCI/Réseau</td><td>1.5</td><td>6.1</td>
     
    								<td >5</td>								
     
    								<td>
     
    								<input type='radio' name='modifproduit' id='id_modif' value='300901'></td>
     
    								</tr>
     
    								<tr><td>Acer netbook one D250</td><td>PC/PCportable</td>
     
    								<td>Portable</td><td>1.3</td><td>211.31</td>
     
    								<td >5</td>								
     
    								<td>
     
    								<input type='radio' name='modifproduit' id='id_modif' value='100301'></td>
     
    								</tr>
     
    								<tr><td>ADATA Flash drive tom pouce</td><td>Consommables</td>
     
    								<td>Alimentation</td><td>1.6</td><td>5.5</td>
     
    								<td >5</td>								
     
    								<td>
     
    								<input type='radio' name='modifproduit' id='id_modif' value='602602'></td>
     
    								</tr>
     
    								<tr><td>AMD Sempron 140</td><td>Composants</td>
     
    								<td>Processeur</td><td>1.4</td><td>47.5</td>
     
    								<td >3</td>								
     
    								<td>
     
    								<input type='radio' name='modifproduit' id='id_modif' value='301101'></td>
     
    								</tr>
     
    								<tr><td>ASUS 21.5p</td><td>PC/PCportable</td>
     
    								<td>Portable</td><td>1.3</td><td>100.52</td>
     
    								<td >2</td>								
     
    								<td>
     
    ......
    ......
    ......
     
                                                   </table>
     
    				</form>
     
     
     
    			</div>
    Par contre je ne comprend pas mes undefined index mais bon ce n'est pas le sujet ça marche très bien comme ça .

Discussions similaires

  1. [AJAX] Vérifier un bouton radio dans un div
    Par nkordiko dans le forum jQuery
    Réponses: 3
    Dernier message: 24/05/2013, 10h23
  2. vérifier plusieurs boutons radio si coché
    Par azorol dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 02/04/2010, 11h36
  3. [RCP] Bouton radio + changement des composites dans la même vue
    Par chiraz86 dans le forum Eclipse Platform
    Réponses: 6
    Dernier message: 16/03/2010, 15h41
  4. Récupérer l'id d'un bouton radio et l'insérer dans une base de donnée
    Par narama87 dans le forum Général JavaScript
    Réponses: 9
    Dernier message: 28/04/2009, 13h18
  5. boutons radio pas beau et sélection de ligne
    Par Virgile le chat dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 26/11/2006, 10h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo