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

jQuery Discussion :

Formulaire Jquery et conflit


Sujet :

jQuery

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut Formulaire Jquery et conflit
    Bonjour
    j'ai un souci avec 2 code jquery et je ne sais pas comment le résoudre.

    j 'ai un formulaire avec un plusieurs choix possible avec message d' erreur si les case ne sont pas coché et également une limite à 3 maximum.

    En voulant ajouter un calendrier mes message d erreur ne fonctionne plus.
    et si je ne met que le jquery des message le calendrier ne fonctionne plus.
    voici les 2 version

    http://www.unprecieux.fr/php/index
    http://www.unprecieux.fr/php/index2
    voici les code



    html :
    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
    <!DOCTYPE html>
    <html lang="fr">
    <head>
    	<title>jQuery test2</title>
     
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Boite de 6</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js "></script>
    <script type="text/javascript" src="js/func.js"></script>	
        <script type="text/javascript" src="js/choix2.js "></script>
     
    <!--  Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) Dual licensed under the MIT or GPL Version 2 licenses. http://jquery.org/license  http://docs.jquery.com/UI/Datepicker  -->
    <!-- traduit et adapté par outils-web.com -->
    <!-- chargement des feuilles de style -->
    	<link rel="stylesheet" href="css/jquery.ui.core.css">
    	<link rel="stylesheet" href="css/jquery.ui.datepicker.css">
    	<link rel="stylesheet" href="css/jquery.ui.widget.css">
    	<!-- les couleurs peuvent définies au sein de la feuille di dessous-->
    	<link rel="stylesheet" href="css/jquery.ui.theme.css">
    <!-- chargement des scripts -->	
    	<script src="scr/jquery.js"></script>
    	<script src="scr/jquery.ui.core.js"></script>
    	<script src="scr/jquery.ui.widget.js"></script>
    	<script src="scr/jquery.ui.datepicker.js"></script>
    	<script src="scr/jquery.ui.datepicker-fr.js"></script>
    <!-- Initialisation de la fonction -->		
    	<script>
    	$(function() {
    		$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
    		$( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] );
    		$( "#locale" ).change(function() {
    			$( "#datepicker" ).datepicker( "option",
    				$.datepicker.regional[ $( this ).val() ] );
    		});
    	});
    	</script>
     
    </head>
    <body>
     
    <div id="font"> 
     
     
    	<div class="titre">Composez votre boite de 6 Précieux
        </div>
     
    	<div class="sous-titre">En choisissant 3 parfums maximum 
    	</div>
     <div id="divchk">
      <div class="choix"> 
      <form id="form" name="form" method="post" action="" onsubmit="return controlvide();" >       
     
                     <table><tr>
     
     
              <td width="140">Vanille</td>
               <td width="90"><input type="checkbox" id="chk1" name="choix[]" value="Vanille" onclick="verifChk('chk1')" /><label for="chk1"></label></td>
     
    	      <td width="142">Chocolat</td> 
    		   <td width="48"><input type="checkbox" id="chk2" name="choix[]" value="chocolat" onclick="verifChk('chk2')" /><label for="chk2"></label></td>		   
        </tr>
        <tr>
               <td>Café</td>
    		    <td><input type="checkbox" id="chk3" name="choix[]" value="café"  onclick="verifChk('chk3')" /><label for="chk3"></label></td>
     
    	       <td>Pistache</td>
    		    <td><input type="checkbox" id="chk4" name="choix[]" value="pistache"  onclick="verifChk('chk4')" /><label for="chk4"></label></td>
        </tr>
    	<tr>
              <td>Praliné</td>
    		    <td><input type="checkbox" id="chk5" name="choix[]" value="Praliné"  onclick="verifChk('chk5')" /><label for="chk5"></label></td>
     
    		 <td>Caramel</td>
    		    <td><input type="checkbox" id="chk6" name="choix[]" value="pistache"  onclick="verifChk('chk6')" /><label for="chk6"></label></td>
        </tr>
    	<tr>
             <td>Kiwi</td>
    		    <td><input type="checkbox" id="chk7" name="choix[]" value="kiwi"  onclick="verifChk('chk7')" /><label for="chk7"></label></td>
     
    		 <td>Cerise amarena</td>
    		    <td><input type="checkbox" id="chk8" name="choix[]" value="Cerise amarena"  onclick="verifChk('chk8')" /><label for="chk8"></label></td>      
        </tr>
    	<tr>
             <td>Coco</td>
    		    <td><input type="checkbox" id="chk9" name="choix[]" value="Coco"  onclick="verifChk('chk9')" /><label for="chk9"></label></td>
     
    		 <td>Fruits exotiques</td>
    		    <td><input type="checkbox" id="chk10" name="choix[]" value="Fruits exotiques"  onclick="verifChk('chk10')" /><label for="chk10"></label></td>    
        </tr>
    	<tr>
             <td>Citron vert</td>
    		    <td><input type="checkbox" id="chk11" name="choix[]" value="citron vert"  onclick="verifChk('chk11')" /><label for="chk11"></label></td>
     
    		 <td>Banane</td>
    		    <td><input type="checkbox" id="chk12" name="choix[]" value="Banane"  onclick="verifChk('chk12')" /><label for="chk12"></td>
        </tr>
    		</div>
             </table>
     
    	</div>
     
    <div class="information">
     
    		<div class="mail_boite">
            <input name="Prenom"  id="Prenom"type="text" placeholder="Nom Prénom" /> <span class="error"></span> </div>
    		<br/><br/><br/>
     
    				 <div class="mail_boite">
            <input name="email"  id="email"type="text" placeholder="Adresse e-mail..." /> <span class="error"></span> </div>
     
    		<br/><br/><br/>
    		<div class="mail_boite">  
    		<input name="tel"  id="tel"type="text" placeholder="Numéro de télèphone" /> <span class="error"></span> </div>
    		<br/><br/>
    	<div class="texte">
    		Livraison sous 48h: <br/>
    	</div>
     
     
    	<table class="ds_box" cellpadding="0" cellspacing="0" id="ds_conclass" style="display: none;"> 
    	<tr><td id="ds_calclass"> </td></tr>
                                             </table>
    <script type="text/javascript" src="js/date.js"></script>	
     
    	<div class="date"> 
    		<input onclick="ds_sh(this);"placeholder="Date de livraison souhaitée" name="date" readonly="readonly" style="cursor: text"/>
         </div>
     
    	<div class="choix2"> 
     
    <div class="demo"><br><br><p>Date: <input type="text" id="datepicker"></p></div>
    		<table>
    			<tr>
     
               <td width="140"><label for="input1">Retrait à Macau</label></td>
               <td width="90"><input type="radio"name="lieux" value="sur Macau" id="input1">
    		   <label for="input1"><span></span></label></td>
     
     
    	       <td width="142"><label for="input2"> A domicile*</label></td> 
    		   <td width="48"><input type="radio"name="lieux" value="chez vous" id="input2">
    		   <label for="input2"><span></span></label></td>	   
     
    			</tr>	
    		</table>
     
    		<p>*limite CUB et sud Médoc - frais 10€.</p>
     
    	</div>
     
     
    		<div align="center"><input type='submit'id="clickMe" name='submit' value='Valider' class="bouton"></div>
    			 </div>
    </form>
     
     
     
      <?php
     
     
    }
     
    ?>
     
     
     
    </div>
    </body>
    </html>

    merci pour les réponse

  2. #2
    Rédacteur

    Avatar de danielhagnoul
    Homme Profil pro
    Étudiant perpétuel
    Inscrit en
    Février 2009
    Messages
    6 389
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 73
    Localisation : Belgique

    Informations professionnelles :
    Activité : Étudiant perpétuel
    Secteur : Enseignement

    Informations forums :
    Inscription : Février 2009
    Messages : 6 389
    Points : 22 933
    Points
    22 933
    Billets dans le blog
    125
    Par défaut


    Faites un essai en remplaçant tout cela :

    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
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js "></script>
    <script type="text/javascript" src="js/func.js"></script>	
        <script type="text/javascript" src="js/choix2.js "></script>
     
    <!--  Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) Dual licensed under the MIT or GPL Version 2 licenses. http://jquery.org/license  http://docs.jquery.com/UI/Datepicker  -->
    <!-- traduit et adapté par outils-web.com -->
    <!-- chargement des feuilles de style -->
    	<link rel="stylesheet" href="css/jquery.ui.core.css">
    	<link rel="stylesheet" href="css/jquery.ui.datepicker.css">
    	<link rel="stylesheet" href="css/jquery.ui.widget.css">
    	<!-- les couleurs peuvent définies au sein de la feuille di dessous-->
    	<link rel="stylesheet" href="css/jquery.ui.theme.css">
    <!-- chargement des scripts -->	
    	<script src="scr/jquery.js"></script>
    	<script src="scr/jquery.ui.core.js"></script>
    	<script src="scr/jquery.ui.widget.js"></script>
    	<script src="scr/jquery.ui.datepicker.js"></script>
    	<script src="scr/jquery.ui.datepicker-fr.js"></script>
    	<script>
    	$(function() {
    		$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
    		$( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] );
    		$( "#locale" ).change(function() {
    			$( "#datepicker" ).datepicker( "option",
    				$.datepicker.regional[ $( this ).val() ] );
    		});
    	});
    	</script>
    par :

    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
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/sunny/jquery-ui.css">
    <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script>
        "use strict";
     
        $( function(){ // forme abrégée de $(document).ready(function(){
     
            $.datepicker.regional['fr'] = {
                closeText: 'Fermer',
                prevText: 'Précédent',
                nextText: 'Suivant',
                currentText: 'Aujourd\'hui',
                monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
                    'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
                monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
                    'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
                dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
                dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
                dayNamesMin: ['D','L','M','M','J','V','S'],
                weekHeader: 'Sem.',
                dateFormat: 'dd/mm/yy',
                firstDay: 1,
                isRTL: false,
                showMonthAfterYear: false,
                yearSuffix: ''
            };
     
            $.datepicker.setDefaults( $.datepicker.regional[ 'fr' ] );
     
            $( "#locale" ).on( "change", function(){
                $( "#datepicker" ).datepicker( "option", $.datepicker.regional[ $( this ).val() ] );
            });
        });
    </script>
    i18n : https://github.com/jquery/jquery-ui/tree/master/ui/i18n

    Blog

    Sans l'analyse et la conception, la programmation est l'art d'ajouter des bogues à un fichier texte vide.
    (Louis Srygley : Without requirements or design, programming is the art of adding bugs to an empty text file.)

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    merci j'ai testé mais cela ne fonctionne pas

  4. #4
    Nouveau membre du Club
    Homme Profil pro
    Inscrit en
    Septembre 2011
    Messages
    52
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2011
    Messages : 52
    Points : 29
    Points
    29
    Par défaut
    au final j ai changer de calendrier est cela marche mieux merci quand même

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. transmettre le formulaire jquery poste
    Par marouxinfo dans le forum Zend Framework
    Réponses: 3
    Dernier message: 31/03/2010, 12h27
  2. Validation formulaire Jquery
    Par ccsuperstar dans le forum jQuery
    Réponses: 3
    Dernier message: 09/11/2009, 16h56
  3. Recupération de données formulaire jQuery
    Par kingd6 dans le forum jQuery
    Réponses: 3
    Dernier message: 26/06/2009, 10h23

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