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 :

Mon formulaire Java


Sujet :

JavaScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau candidat au Club
    Inscrit en
    Juin 2009
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Juin 2009
    Messages : 2
    Par défaut Mon formulaire Java
    Bonjour à tous.
    Voilà j'ai créer un petit formulaire pour mon site qui fonctionne impec et tourne grâce au serveur d'un de mes hébergeurs Web belge, à savoir Skynet. Mais malheureusement je n'ai pas sécuriser mon formulaire et j'aimerais qu'au moment de pousser sur le bouton [Envoyer], les champs NOM, PRENOM, E-MAIL & VILLE soit vérifier en tant que remplis sinon il retournerais un message d'erreur pour le demander ! Y'a t-il de moyen de vite faire ça ? Merci à tous !!! je vous laisse mon petit code et je vous remercie tres fort !

    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
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
     
    <FORM METHOD=POST ACTION="http://users.skynet.be/cgi-bin/formd.cgi" onsubmit="return formemail_Validator(this)" name="formemail">
     
    <body bgcolor="#181C20">
     
    <INPUT TYPE=hidden NAME="to" value ="XXXXXXXXXXXXXX">
    <INPUT TYPE=hidden NAME="subject" VALUE="XXXXXXXXXXXXXX">
    <INPUT TYPE=hidden NAME="next" value="XXXXXXXXXXXXX">
    <table border="1" width="493" height="133" style="border-width: 0px">
    	<tr>
    		<td height="29" width="483" colspan="5" bgcolor="#181C20" style="border-style: none; border-width: medium">
    		<p align="center">
    		<font face="Verdana" style="font-weight:700" color="#FFFF00" size="4">Vous</font></td>
    	</tr>
    	<tr>
    		<td height="33" width="72" style="border-style: none; border-width: medium">
    		<p align="center">
    	              <select name="genre">
    	              <option>Mlle</option>
                    <option>Mme</option>
                    <option>Mr</option>
     
                  </select></td>
    		<td height="33" width="33" style="border-style: none; border-width: medium"><span style="font-size: 9pt">
    		<font color="#FFFFFF" face="Verdana">Nom:</font></span></td>
    		<td height="33" width="153" style="border-style: none; border-width: medium">
        <font face="Verdana"><span style="font-size: 9pt">
        <INPUT name="nom" size="15" style="float: left"></span></font></td>
    		<td height="33" width="63" style="border-style: none; border-width: medium">
    		<font color="#FFFFFF" face="Verdana" style="font-size: 9pt">Prénom:</font></td>
    		<td height="33" width="139" style="border-style: none; border-width: medium">
        <font face="Verdana"><span style="font-size: 9pt">
        <INPUT name="prenom" size="15" style="float: left"></span></font></td>
    	</tr>
    	<tr>
    		<td height="29" width="71" style="border-style: none; border-width: medium">
    		<p align="right">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">E-Mail:</font></td>
    		<td height="29" width="33" style="border-style: none; border-width: medium">&nbsp;</td>
    		<td height="29" width="367" colspan="3" style="border-style: none; border-width: medium">
    	<font face="Verdana"><span style="font-size: 9pt">
    	<INPUT name="e-mail" size="24" style="float: left"></span></font></td>
    	</tr>
    	<tr>
    		<td height="30" width="71" style="border-style: none; border-width: medium">
    		<p align="right"><font face="Verdana" color="#FFFFFF"><span style="font-size: 9pt">
    		Téléphone:</span></font></td>
    		<td height="30" width="33" style="border-style: none; border-width: medium">&nbsp;</td>
    		<td height="30" width="367" colspan="3" style="border-style: none; border-width: medium">
    	<font face="Verdana"><span style="font-size: 9pt">
    	<INPUT name="Telephone" size="24" style="float: left"></span></font></td>
    	</tr>
    	</table>
     
    <table border="1" width="14" height="29" style="border-width: 0px">
    	<tr>
    		<td height="23" width="14" style="border-style: none; border-width: medium">&nbsp;</td>
    	</tr>
    </table>
    <table border="1" width="493" height="154" style="border-width: 0px">
    	<tr>
    		<td height="30" width="493" colspan="5" bgcolor="#181C20" style="border-style: none; border-width: medium">
    		<p align="center">
    		<font face="Verdana" style="font-weight:700" size="4" color="#FFFF00">Votre 
    		évènement</font></td>
    	</tr>
    	<tr>
    		<td height="28" width="79" style="border-style: none; border-width: medium">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Organisateur:</font></td>
    		<td height="28" width="398" colspan="4" style="border-style: none; border-width: medium">
    	              <select name="Organisateur">
                    <option>Particulier</option>
                    <option>Restaurant/Café</option>
                    <option>École</option>
                    <option>Association</option>
                    <option>Autre</option>
     
                  </select></td>
    	</tr>
    	<tr>
    		<td height="27" width="79" style="border-style: none; border-width: medium">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Évènement:</font></td>
    		<td height="27" width="129" style="border-style: none; border-width: medium">
    	              <select name="Evenement">
                    <option>Anniversaire</option>
                    <option>Communion</option>
                    <option>Baptème</option>
                    <option>Mariage</option>
                    <option>Soirée rhéto</option>
                    <option>Soirée privée</option>
                    <option>Autre</option>
     
                  </select></td>
    		<td height="27" width="43" style="border-style: none; border-width: medium">
    	              </td>
    		<td height="27" width="103" style="border-style: none; border-width: medium">
    	              <font face="Verdana" style="font-size: 9pt" color="#FFFFFF">Nbr personnes:</font></td>
    		<td height="27" width="96" style="border-style: none; border-width: medium">
    	              <select name="Nbr-Personnes">
                    <option>- de 50</option>
                    <option>50 à 100</option>
                    <option>100 à 150</option>
                    <option>150 à 200</option>
                    <option>+ de 200</option>
     
                  </select></td>
    	</tr>
    	<tr>
    		<td height="27" width="79" style="border-style: none; border-width: medium">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Lieu:</font></td>
    		<td height="27" width="398" colspan="4" style="border-style: none; border-width: medium">
    	              <select name="Lieu">
                    <option>Salle de réception</option>
                    <option>Restaurant/Café</option>
                    <option>École</option>
                    <option>Particulier</option>
                    <option>Plein air</option>
                    <option>Autre</option>
     
                  </select></td>
    	</tr>
    	<tr>
    		<td height="28" width="79" style="border-style: none; border-width: medium">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Ville:</font></td>
    		<td height="28" width="129" style="border-style: none; border-width: medium">
    	<font face="Verdana"><span style="font-size: 9pt">
    	<INPUT name="Ville" size="16" style="float: left"></span></font></td>
    		<td height="28" width="43" style="border-style: none; border-width: medium">
    	&nbsp;</td>
    		<td height="28" width="103" style="border-style: none; border-width: medium">
    	<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">Code postal:</font></td>
    		<td height="28" width="96" style="border-style: none; border-width: medium">
    	<font face="Verdana"><span style="font-size: 9pt">
    	<INPUT name="Code-Postal" size="6" style="float: left"></span></font></td>
    	</tr>
    	</table>
    <table border="1" width="492" height="32" style="border-width: 0px">
    	<tr>
    		<td height="26" width="128" style="border-style: none; border-width: medium">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Date (jj/mm/aaaa):</font></td>
    		<td height="26" width="157" style="border-style: none; border-width: medium">
    	<font face="Verdana"><span style="font-size: 9pt">
    	<INPUT name="Date" size="16" style="float: left"></span></font></td>
    		<td height="26" width="59" style="border-style: none; border-width: medium">
    	<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">Horaire:</font></td>
    		<td height="26" width="40" style="border-style: none; border-width: medium">
    	              <select name="Heure-debut">
                    <option>0</option>
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                    <option>6</option>
                    <option>7</option>
                    <option>8</option>
                    <option>9</option>
                    <option>10</option>
                    <option>11</option>
                    <option>12</option>
                    <option>13</option>
                    <option>14</option>
                    <option>15</option>
                    <option>16</option>
                    <option>17</option>
                    <option>18</option>
                    <option>19</option>
                    <option>20</option>
                    <option>21</option>
                    <option>22</option>
                    <option>23</option>
     
                  </select></td>
    		<td height="26" width="11" style="border-style: none; border-width: medium">
    	              <p align="center"><font face="Verdana" style="font-size: 9pt">
    					à</font></td>
    		<td height="26" width="57" style="border-style: none; border-width: medium">
    	              <select name="Heure-fin">
                    <option>0</option>
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                    <option>6</option>
                    <option>7</option>
                    <option>8</option>
                    <option>9</option>
                    <option>10</option>
                    <option>11</option>
                    <option>12</option>
                    <option>13</option>
                    <option>14</option>
                    <option>15</option>
                    <option>16</option>
                    <option>17</option>
                    <option>18</option>
                    <option>19</option>
                    <option>20</option>
                    <option>21</option>
                    <option>22</option>
                    <option>23</option>
     
                  </select></td>
    	</tr>
    	</table>
    <table border="1" width="493" height="55" style="border-width: 0px">
    	<tr>
    		<td height="55" width="109" style="border-style: none; border-width: medium">
    		<font face="Verdana" color="#FFFFFF">
    		<span style="font-size: 9pt">Votre message:</span></font></td>
    		<td height="55" width="368" style="border-style: none; border-width: medium"><font face="Verdana"><span style="font-size: 9pt">
    		<TEXTAREA name="Message" cols="43" rows="4"></TEXTAREA></span></font></td>
    	</tr>
    </table>
    <table border="1" width="8" height="25" style="border-width: 0px">
    	<tr>
    		<td height="19" width="8" style="border-style: none; border-width: medium"></td>
    	</tr>
    </table>
    <table border="1" width="494" height="48" style="border-width: 0px">
    	<tr>
    		<td height="30" width="334" style="border-style: none; border-width: medium">
    		<p align="center">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">
    		Comment avez-vous découvert Démoniak Sono ?</font></td>
    		<td height="30" width="144" style="border-style: none; border-width: medium">
    	              <select name="Cmt-connu-site?">
                    <option>Ami/Proche</option>
                    <option>Annonce Ebay</option>
                    <option>Vu en soirée</option>
                    <option>Publicité</option>
                    <option>Sur Véhicule</option>
                    <option>Autre</option>
     
                  </select></td>
    	</tr>
    	<tr>
    		<td height="2" width="478" colspan="2" style="border-style: none; border-width: medium">&nbsp;<p align="center">
    		<font face="Verdana" style="font-size: 9pt" color="#FFFFFF">Merci de vérifier votre 
    		adresse E-Mail et téléphone avant de cliquer <i><br>
    		une seule fois</i> sur &quot;Valider&quot;<br>
    &nbsp;</font></td>
    		</tr>
    </table>
    <table border="1" width="494" height="48" style="border-width: 0px">
    	<tr>
        <td width="229" height="57" align="center" bordercolorlight="#000000" bordercolordark="#000000" style="border-style: none; border-width: medium">
        <p align="center">
     
     
    <font face="Verdana"><span style="font-size: 9pt">
     
     
    <INPUT type="submit" name="nom2" value="Envoyer" style="float: right"> </span>
    </font> </td>
        <td width="249" height="57" align="center" bordercolorlight="#000000" bordercolordark="#000000" style="border-style: none; border-width: medium">
        <p align="center">   
     
     
    <font face="Verdana"><span style="font-size: 9pt">   
     
     
    <INPUT type="reset" name="nom1" value="Effacer le formulaire" style="float: left"></span></font><p align="center">

  2. #2
    Membre Expert Avatar de franculo_caoulene
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    2 880
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 2 880
    Par défaut
    Salut et bienvenue,

    1) Avant de poster tu dois d'abord lire les règles du forum qui t'aurait amené à la FAQ.

    2) On développe bien Javascript et pas Java. Ce n'est pas du tout la même chose!

  3. #3
    Nouveau candidat au Club
    Inscrit en
    Juin 2009
    Messages
    2
    Détails du profil
    Informations forums :
    Inscription : Juin 2009
    Messages : 2
    Par défaut
    Lol oké sauf que c'est quand meme du javascript mon formulaire

  4. #4
    Expert confirmé
    Avatar de le_chomeur
    Profil pro
    Développeur informatique
    Inscrit en
    Février 2006
    Messages
    3 653
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Février 2006
    Messages : 3 653
    Par défaut
    Salut et bienvenue , la politesse t'aurais amené a cliqué sur les liens donnés par mon collègue qui t'aurais amené directement à ta réponse :

    http://javascript.developpez.com/faq...s#ControleForm

  5. #5
    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
    Citation Envoyé par DemoniakNico Voir le message
    Lol oké sauf que c'est quand meme du javascript mon formulaire
    Salut,
    est non ton formulaire c'est de l'html. le jvs c'est ce que l'on va essayer de voir avec toi.

    Donc, en gros ce qu'il va falloir faire c'est déclarer dans ton form un onsubmit qui va appeler une fonction javascript te permettant de vérifier que tes champs sont bien remplis.

    en gros un petit coup d'oeil pour t'aider.
    la vie n'est pas cirrhose des foies ...

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

Discussions similaires

  1. Réponses: 3
    Dernier message: 08/01/2009, 14h44
  2. [Stratégie]optimiser mon application java
    Par Malo dans le forum Langage
    Réponses: 3
    Dernier message: 14/02/2006, 04h45
  3. la date et heure sur mon formulaire
    Par azde7015 dans le forum Access
    Réponses: 11
    Dernier message: 07/02/2006, 10h40
  4. [Debutant(e)]mise à jour de mon formulaire via JSP
    Par kouadjalain dans le forum Servlets/JSP
    Réponses: 4
    Dernier message: 11/08/2004, 15h43

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