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

HTML Discussion :

Bouton ne marche pas


Sujet :

HTML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éprouvé
    Homme Profil pro
    aux études mais 40 ans
    Inscrit en
    Juin 2004
    Messages
    2 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : aux études mais 40 ans

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 037
    Par défaut Bouton ne marche pas
    J'ai une page dont voici le 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
    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
    <!DOCTYPE html>
    <!-- tag intro et co --> <?php include("./introdoc.php"); ?>
     
    <style>.art-content .art-postcontent-0 .layout-item-0 { margin-bottom: 5px;  }
    .art-content .art-postcontent-0 .layout-item-1 { border-spacing: 10px 0px; border-collapse: separate;  }
    .art-content .art-postcontent-0 .layout-item-2 { border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:#EFEBE1;border-right-color:#EFEBE1;border-bottom-color:#EFEBE1;border-left-color:#EFEBE1; color: #322C1B; background: #F1E1DF; padding-right: 10px;padding-left: 10px; border-radius: 10px;  }
    .ie7 .post .layout-cell {border:none !important; padding:0 !important; }
    .ie6 .post .layout-cell {border:none !important; padding:0 !important; }
    .grand { height: 4px; background: #abc; font-size: 6px; font-family: 'Trebuchet MS', Arial, Helvetica, Sans-Serif; }
     
    </style></head>
    <body>
    <div id="art-main">
    <!-- affiche header     --> <?php include("./header.php"); ?>
    <!-- affiche navigation --> <?php include("./navig.php"); ?>
     
    <div class="art-sheet clearfix">
                <div class="art-layout-wrapper clearfix">
                    <div class="art-content-layout">
                        <div class="art-content-layout-row">
                            <div class="art-layout-cell art-content clearfix"><article class="art-post art-article">
                                <div class="art-postcontent art-postcontent-0 clearfix"><div class="art-content-layout-wrapper layout-item-0"><div class="art-content-layout layout-item-1"><div class="art-content-layout-row"><div class="art-layout-cell layout-item-2" style="width: 100%" ><p style="text-align: center;">
     
    <!-- Début ensemble de trois images du haut-->
    		<a href="spectacle-1.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/Jerome-de-Warzee-affiche-hautes-tensions.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-2.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/jerome-de-warzee-kody-cactus-waterzooi-koeks.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159);">
    		</a>&nbsp;
     
    		<a href="spectacle-3.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/f12618b9-f882-4f49-9760-70afd065e5a4.png" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-4.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/laura-laune-petite.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-5.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; text-decoration: underline;">
    		<img width="145" height="204" alt="" src="images/sofia-syko.png" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>
     
    <br></p></div></div></div></div><div class="art-content-layout-wrapper layout-item-0"><div class="art-content-layout layout-item-1"><div class="art-content-layout-row"><div class="art-layout-cell layout-item-2" style="width: 100%" ><h4 style="text-align: center;">
     
    <!-- Début ensemble de trois images du bas-->
    		<a href="spectacle-6.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/megan-giart.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-7.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/karen-chataigner.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159);">
    		</a>&nbsp;
     
    		<a href="spectacle-8.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/merri.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-9.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; color: rgb(180, 208, 37);">
    		<img width="145" height="204" alt="" src="images/manon.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>&nbsp;
     
    		<a href="spectacle-10.php" target="_blank" title="Cliquez ici" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-align: center; text-decoration: underline;">
    		<img width="145" height="204" alt="" src="images/vide.jpg" class="" style="border-top-width: 3px; border-right-width: 3px; border-bottom-width: 3px; border-left-width: 3px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(229, 229, 159); border-right-color: rgb(229, 229, 159); border-bottom-color: rgb(229, 229, 159); border-left-color: rgb(229, 229, 159); ">
    		</a>
     
    <span style="color: rgb(239, 178, 87); font-size: 18px;"><br></span></h4></div></div></div></div><div class="art-content-layout-wrapper layout-item-0"><div class="art-content-layout layout-item-1"><div class="art-content-layout-row">
     
    <!-- Bloc à votre services-->	
    	<div class="art-layout-cell layout-item-2" style="width: 25%" >
            <h4><span style="color: rgb(239, 178, 87); font-size: 18px;">A votre service...</span></h4>
            <p style="text-align: left;"><span style="font-family: Arial; color: rgb(0, 0, 0); font-size: 14px;">L'agence Imagi Scène vous propose plusieurs spectacles pour tous types de manifestations. &nbsp; &nbsp; Centre Culturel, team building, chapiteau, évent' d'entreprise,soirée à thème, nous vous proposons un artiste, un spectacle complet, un service clef sur porte pour tout votre évennement.&nbsp;</span></p>
            <p style="text-align: left;"><span style="font-family: Arial; color: rgb(0, 0, 0); font-size: 14px;"><span class="hps">you can imagine</span>,&nbsp;<span class="hps">we do.</span></span><br></p>
            <BR>
    		<p><a href="qui-sommes-nous.php" title="Cliquez ici" class="art-button">Lire plus</a></p>
    </div>
     
    <!-- Bloc visitez le site en détail-->		
    	<div class="art-layout-cell layout-item-2" style="width: 25%" ><h4><span style="color: rgb(239, 178, 87);"><span style="font-size: 18px;">Visitez le site en détail.</span></span></h4><ul>
     
    		<li style="text-align: left;"><a href="agenda.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Agenda des spectacles</span></a></li>
            <li style="text-align: left;"><a href="reference.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Références</span></a></li>
            <li style="text-align: left;"><a href="equipe.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">L'Equipe</span></a></li>
            <li style="text-align: left;"><a href="castings.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Vous avez du talent ?</span></a></li>
            <li style="text-align: left;"><a href="reference.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Partenaires</span></a></li>
            <li style="text-align: left;"><a href="qui-sommes-nous.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Qui sommes nous</span></a></li>
            <li style="text-align: left;"><a href="https://www.facebook.com/Renaudlighting" target="_blank" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Facebook</span></a></li>
            <li style="text-align: left;"><a href="galerie.php" title="Cliquez ici"><span style="color: rgb(0, 0, 0);">Galerie de photos</span></a></li>
     
    </ul><h4><span style="color: rgb(239, 178, 87); font-size: 18px;"></span></h4>
     
    <!-- Bloc visitez le site en détail partie dédiée à la newsletter -->
    <div class="newsletter">Inscrivez-vous à la news-letter...</div>
    <BR>
    <form action="http://espaceimy.cluster010.ovh.net/phpmynewsletter/subscription.php" method="post" name="sub_form" target="formPopup" onsubmit="submitform();document.getElementById('id-mail').value='' ;false;">
    	<div class="champsnewsletter">
    		<input type="text" id="id-mail" name="email_addr" class="grand" value="Adresse électronique" onfocus="if (this.value=='Adresse électronique') this.value=''" />
    	</div>
    	<div class="butnewsletter">
    		<input type="button" style="height:2em; background:#FFCC99;"  name="sub" value=" JE M'INSCRIS " onclick="submitform()"/>
    	</div>
    	<input style="display:none" type="radio" class='radio' name="op" value="join" checked="checked" />
    	<input type='hidden' name='list_id' value='1'>
    	<input type='hidden' name='popup' value="_popup">	
    </form>
    </div>
     
    <!-- Bloc truc à la une-->		
    	<div class="art-layout-cell layout-item-2" style="width: 50%" >
            <h4><span style="color: rgb(239, 178, 87); font-size: 18px;">A la une...</span></h4>
            <p style="text-align: left;">
    		<span style="color: rgb(0, 0, 0); font-size: 14px; letter-spacing: -1px; font-family: Arial, 'Arial Unicode MS', Helvetica, sans-serif;">Découvrez un nouveau talent, un nouveau sketch ou redécouvrez une perle d'un de nos artistes. &nbsp;&nbsp;</span><span style="font-family: Arial, 'Arial Unicode MS', Helvetica, sans-serif; font-size: 14px; letter-spacing: -1px; color: rgb(0, 0, 0);">Une séquence à partager sur les réseaux sociaux avec vos amis....</span></p>
            <p></p>
            <p>
     
    		<!-- Incrustation vidéo YOUTUBE-->			
    		<?php
    $videos = array(
                    '//www.youtube.com/embed/WgxD9MNUMCg',//adresse vidéo 1
                    '//www.youtube.com/embed/0gKSaStDmsQ',//adresse vidéo 2
                    '//www.youtube.com/embed/4uUrdGsq-w0',//adresse vidéo 3
                    '//www.youtube.com/embed/bO-GYsjAJ0U',//adresse vidéo 4
                    '//www.youtube.com/embed/EldzvaC2woc',//adresse vidéo 5
                    //'www.youtube.com/embed/ZRqsdQEdqER'//adresse vidéo 6
                    );
    $alea = rand(0, (count($videos)-1)); // aléatoire
    $video = $videos[$alea];
    ?>
    		<iframe width="403" height="240" src="<?php echo $video; ?>" frameborder="0" allowfullscreen></iframe>   
     
     
    		</p>
             <p><a href="http://www.jeromedewarzee.com" target="_blank" title="Cliquez ici"></a></p>
        </div>
        </div>
    </div>
    </div>
    </div>
     
                    </article>
     
     
    </div>
                        </div>
                    </div>
                </div>
        </div>
     
     
    <!-- affiche footer --> <?php include("./footer.php"); ?>	
     
    </div>
     
    </body></html>
    Sur cette page il y a une zone dédiée à la newsletter, la voici :

    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
    <!-- Bloc visitez le site en détail partie dédiée à la newsletter -->
    <div class="newsletter">Inscrivez-vous à la news-letter...</div>
    <BR>
    <form action="http://espaceimy.cluster010.ovh.net/phpmynewsletter/subscription.php" method="post" name="sub_form" target="formPopup" onsubmit="submitform();document.getElementById('id-mail').value='' ;false;">
    	<div class="champsnewsletter">
    		<input type="text" id="id-mail" name="email_addr" class="grand" value="Adresse électronique" onfocus="if (this.value=='Adresse électronique') this.value=''" />
    	</div>
    	<div class="butnewsletter">
    		<input type="button" style="height:2em; background:#FFCC99;"  name="sub" value=" JE M'INSCRIS " onclick="submitform()"/>
    	</div>
    	<input style="display:none" type="radio" class='radio' name="op" value="join" checked="checked" />
    	<input type='hidden' name='list_id' value='1'>
    	<input type='hidden' name='popup' value="_popup">	
    </form>
    </div>
    Si j'introduis une adresse mail et que je fais ENTER ça marche mais si je valide en cliquant sur le bouton plutôt que ENTER ça ne marche pas.
    Je ne comprends pas prq mon bouton ne marche pas :-(

    Quelqu'un peut m'aider ?
    Merci.

  2. #2
    Membre extrêmement actif
    Avatar de Muchos
    Homme Profil pro
    Enseignant
    Inscrit en
    Décembre 2011
    Messages
    1 704
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Ardennes (Champagne Ardenne)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Décembre 2011
    Messages : 1 704
    Billets dans le blog
    6
    Par défaut
    Et ça marche en passant par son équivalent BUTTON ?
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <button style="height:2em; background:#FFCC99;" name="sub" onclick="submitform()">JE M'INSCRIS</button>

  3. #3
    Modérateur
    Avatar de Vil'Coyote
    Homme Profil pro
    Développeur adélia & Web
    Inscrit en
    Février 2008
    Messages
    4 583
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur adélia & Web
    Secteur : Industrie

    Informations forums :
    Inscription : Février 2008
    Messages : 4 583
    Par défaut
    3 choses,
    1. elle fait quoi ta fonction submitform()??
    2. si elle ne sert qu'a émettre tes données pourquoi ne pas prendre un bouton submit?
    3. manque ; après ta ton appel de fonction submitform()
    la vie n'est pas cirrhose des foies ...

    Avant de poster un message Rechercher n'est pas qu'une option.
    FAQ Web - Tuto Web

  4. #4
    Membre éprouvé
    Homme Profil pro
    aux études mais 40 ans
    Inscrit en
    Juin 2004
    Messages
    2 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations professionnelles :
    Activité : aux études mais 40 ans

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 037
    Par défaut
    merci avec :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <button style="height:2em; background:#FFCC99;" name="sub" onclick="submitform()">JE M'INSCRIS</button>
    ca marche en effet.
    Si quelqu'un veut m'expliquer prq c'est avec plaisir :-)

  5. #5
    Membre extrêmement actif
    Avatar de Muchos
    Homme Profil pro
    Enseignant
    Inscrit en
    Décembre 2011
    Messages
    1 704
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Ardennes (Champagne Ardenne)

    Informations professionnelles :
    Activité : Enseignant
    Secteur : Arts - Culture

    Informations forums :
    Inscription : Décembre 2011
    Messages : 1 704
    Billets dans le blog
    6
    Par défaut
    Citation Envoyé par Yepazix
    Si quelqu'un veut m'expliquer prq c'est avec plaisir
    Parce que le JS n'est pas bon (lire Vil'Coyote) ><

    Quant à <button>, son type est "submit" par défaut, agissant comme un <input type="submit" />.
    Pour sa part, <input type="button" /> est l'équivalent d'un <button type="button">. Comme le JS n'est pas bon, je pense que l'explication est là…

  6. #6
    Invité
    Invité(e)
    Par défaut
    Bonjour,
    de plus, remplacer :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <input type="text" id="id-mail" name="email_addr" class="grand" value="Adresse électronique" onfocus="if (this.value=='Adresse électronique') this.value=''" />
    par :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <input type="text" id="id-mail" name="email_addr" class="grand" placeholder="Adresse électronique" value="" />

  7. #7
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 931
    Détails du profil
    Informations personnelles :
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 931
    Par défaut
    Citation Envoyé par Muchos Voir le message
    Quant à <button>, son type est "submit" par défaut
    Ca dépend des navigateurs. C'est pour ça qu'il faut toujours préciser le type.

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

Discussions similaires

  1. bouton equal marche pas
    Par domxaline dans le forum Débuter avec Java
    Réponses: 3
    Dernier message: 29/08/2013, 11h40
  2. Le bouton suppr et autre bouton ne marche pas vs 2012
    Par adilobrf dans le forum Langages
    Réponses: 0
    Dernier message: 14/04/2013, 15h23
  3. Bouton Radio marche pas
    Par chanteur06 dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 18/06/2010, 11h44
  4. [xhtml][css] bouton du form ne marche pas avec IE6
    Par chinouk dans le forum Mise en page CSS
    Réponses: 3
    Dernier message: 14/06/2005, 14h00
  5. Réponses: 4
    Dernier message: 04/05/2005, 13h54

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