Bouton radio et Calendrier
Bonjour,
Étant en deuxième année de BTS Informatique et Réseaux pour l'Industrie et les Services techniques (IRIS), j'ai un projet à réaliser pour l'examen de fin d'année.
Pour ma part, je dois réaliser un site web d'achat de billets d'avion. Le site doit pouvoir proposer différentes destinations, avec différents horaires, avec différentes compagnies etc. Il serait équivalent aux sites tels que http://www.govoyages.com/ ou encore http://www.kayak.fr/.
J'ai commencer le développement de mon formulaire mais je suis bloqué sur deux points:
1) Comment réaliser un calendrier où il n'est pas possible de sélectionner une date qui est dépassée. ( J'ai cherché sur internet mais je n'ai rien trouvé de convainquant.)
2) Le client aura le choix entre un vol "aller/retour" ou seulement "aller" : j'ai donc utilisé un <input type="radio"> mais si le client sélectionne le bouton "aller" j'aimerais que la case "date de retour" s'enlève.
Voici mon code HTML :
Code:
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
| <html>
<head>
<title>Choose your flight !</title>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" href="design.css" />
</head>
<body>
<?php include("header.php"); ?>
<?php include("menu.php"); ?>
<!-- Corps -->
<div id="corps">
<!-- Formulaire pour trouver un vol -->
<div id="formulaire" class="div_corps">
<caption><h1 id="titre_form"> TROUVER UN <span class="mots_clés">VOL</span> </h1></caption>
<form method="post" action="traitement_recherche_vol.php"><table>
<tr><td class="colonne1">
<label for="alle_retour" class="colonne1">Aller Retour</label>
<input type="radio" name="aller_retour" checked>
</td>
<td class="colonne2">
<label for="aller" class="colonne1">Aller simple</label>
<input type="radio" name="aller_retour">
</td></tr>
<tr><td class="colonne1">
<label>Départ</label> : <br><input type="text" name="depart" />
</td>
<td class="colonne2">
<label>Arrivée</label> : <br><input type="text" name="arrivee" />
</td></tr>
<tr><td class="colonne1">
<label>Date de départ :</label><br><input type="text" name="date_depart" onclick="ds_sh(this);" />
</td>
<td class="colonne2">
<label>Date de retour :</label><br><input type="text" name="date_retour" onclick="ds_sh(this);" />
</td></tr>
<tr><td class="colonne1">
<label for="adultes" class="colonne1_1">Adulte(s) :</label>
<label for="enfants" class="colonne1_2">Enfant(s) :</label>
</td>
<td class="colonne2">
<label for="classe" "colonne1_1">Classe :</label>
<label for="direct" class="colonne2_2">Vol direct </label>
</td></tr>
<tr><td class="colonne1">
<select name="adultes"> <!-- menu deroulant pour choisir le nombre de voyageurs -->
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
<select name="enfants" class="colonne1_1_2">
<option value="1">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select></td>
<td class="colonne2"><select name="classe" id="classe">
<option value="economique">Economique</option>
<option value="affaire">Affaire</option>
<option value="premiere">Première</option>
</select>
<input type="checkbox" name="vol_direct" class="colonne2_2">
</td></tr>
<tr><td></td>
<td class="colonne2">
<input type="submit" value="Rechercher un vol" class="rechercher" />
</td></tr>
</table>
</form></div> <!-- fin de la div "formulaire" -->
<!-- PROMOTIONS -->
<div id="promo" class="div_corps">
<h1 id="titre_promo"> NOS MEILLEURES <span class="mots_clés">OFFRES DU MOMENT</span> </h1>
<div id="tableau_promo">
<table id="table_promo">
<thead class="t_head">
<tr id="itr"><td class="ligne_head">
Départ
</td>
<td class="ligne_head">
Destination
</td >
<td class="ligne_head">
Compagnie
</td>
<td class="ligne_head">
Dates
</td>
<td class="ligne_head">
Prix
</td>
</tr>
</thead>
<tbody>
<tr id="itr"><td class="ligne_paire">
PARIS
</td>
<td class="ligne_paire" >
<span style="text-transform:uppercase" class="mots_clés">BARCELONE</span>
</td >
<td class="ligne_paire" >
VUELING
</td>
<td class="ligne_paire">
Du 16/03 au 18/03
</td>
<td class="ligne_paire">
Dès 64
</td>
</tr>
<tr id="itr"><td class="ligne_impaire">
PARIS
</td>
<td class="ligne_impaire" >
<span style="text-transform:uppercase" class="mots_clés">VENISE</span>
</td >
<td class="ligne_impaire" >
AIR FRANCE
</td>
<td class="ligne_impaire">
Du 14/03 au 16/03
</td>
<td class="ligne_impaire">
Dès 69
</td>
</tr>
<tr id="itr"><td class="ligne_paire">
PARIS
</td>
<td class="ligne_paire" >
<span style="text-transform:uppercase" class="mots_clés">ROME</span>
</td >
<td class="ligne_paire" >
VUELING
</td>
<td class="ligne_paire">
Du 09/03 au 11/03
</td>
<td class="ligne_paire">
Dès 64
</td>
</tr>
<tr id="itr"><td class="ligne_impaire">
PARIS
</td>
<td class="ligne_impaire" >
<span style="text-transform:uppercase" class="mots_clés">ALGER</span>
</td >
<td class="ligne_impaire" >
AIR FRANCE
</td>
<td class="ligne_impaire">
Du 14/03 au 16/03
</td>
<td class="ligne_impaire">
Dès 69
</td>
</tr>
<tr id="itr"><td class="ligne_paire">
PARIS
</td>
<td class="ligne_paire" >
<span style="text-transform:uppercase" class="mots_clés">MADRID</span>
</td >
<td class="ligne_paire" >
VUELING
</td>
<td class="ligne_paire">
Du 09/03 au 11/03
</td>
<td class="ligne_paire">
Dès 64
</td>
</tr>
<tr id="itr"><td class="ligne_impaire">
PARIS
</td>
<td class="ligne_impaire" >
<span style="text-transform:uppercase" class="mots_clés">TOKYO</span>
</td >
<td class="ligne_impaire" >
AIR FRANCE
</td>
<td class="ligne_impaire">
Du 14/03 au 16/03
</td>
<td class="ligne_impaire">
Dès 69
</td>
</tr>
<tr id="itr"><td class="ligne_paire">
PARIS
</td>
<td class="ligne_paire" >
<span style="text-transform:uppercase" class="mots_clés">MIAMI</span>
</td >
<td class="ligne_paire" >
VUELING
</td>
<td class="ligne_paire">
Du 09/03 au 11/03
</td>
<td class="ligne_paire">
Dès 64
</td>
</tr>
</tbody>
</table>
</div> <!-- fin de la div TABLEAU -->
</div> <!-- fin de la div PROMOTIONS -->
<div id="image">
<img id="monde" src="./images/monde.jpg" alt="monde"/>
</div>
<?php include("footer.php"); ?>
</div> <!-- fin de la div "corps" -->
</body>
</html> |
Code CSS :
Code:
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
| body
{
margin : 0;
}
#header
{
background-image:white;
width: auto;
height: 18%;
margin-left: 100px;
padding-top: 15px;
}
#logo
{
width: 380px;
height: 90px;
}
#menu
{
width: 100%;
height: 35px;
background-image: url("./images/menu.png");
background-repeat:no-repeat;
background-size:100%
}
#menu ul
{
text-align: center;
font-size:20px;
margin-top:0px;
background-repeat:no-repeat;
padding-top: 4px;
}
#menu a
{
color: white;
text-decoration: none;
margin-left: 50px;
margin-right: 50px;
}
#menu a:hover
{
color: #FF8000;
}
#corps
{
padding-top : 20px;
background-image:radial-gradient(#FFE200, #FF9100);
}
.div_corps
{
background-image:radial-gradient(white, #57CBDF);
border:1px solid #9FC6FF;
/*arrondir les coins en haut à gauche et en bas à droite*/
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:4px;
box-shadow: 0px 2px 8px rgba(0, 0, 0, 1);
}
.mots_clés
{
color: #CB0044;
}
#titre_form
{
color: #3E3D40;
font-size: 20px;
text-align: center;
}
#formulaire
{
float:left;
padding:10px;
width:400px;
height: 270px;
margin-left: 10%;
}
#formulaire table
{
padding: auto;
margin: auto;
}
.colonne1 /* Colonnes du formulaire */
{
padding-left:15px;
font-family: "Trebuchet MS";
font-size: 14px;
}
.colonne2
{
padding-left: 30px;
font-family: "Trebuchet MS";
font-size: 14px;
}
.colonne1_2
{
margin-left:30px;
font-size: 14px;
}
.colonne1_1_2
{
margin-left:65px;
font-size: 14px;
}
.colonne2_2
{
margin-left: 50px;
font-size: 14px;
}
.rechercher
{
color: #3E3D40;
font-family: "Cooper Black";
height: 30px;
width: 140px;
margin-left: 30px;
margin-top: 10px;
background-color: #C3E6EC;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
text-align: center;
}
#promo
{
margin-left:50% ;
width:600px;
height:345px;
}
#titre_promo
{
color: #3E3D40;
font-size: 20px;
margin-left: 7px;
border-bottom: 1px solid rgb(192, 193, 194);
width: 68%;
}
#tableau_promo
{
font-size: 11px;
margin-left: 7px;
margin-right: 7px;
}
#table_promo
{
width: 100%;
}
#itr
{
margin:0px;
padding: 0px;
}
.ligne_head
{
color: white;
font-size: 11px;
border-bottom: 1px solid rgb(192, 193, 194);
font-family: Arial;
background-color: #00A2E8;
text-align: center;
height: 22px;
}
.ligne_paire
{
font-weight : bold;
color: #747678;
font-size: 15px;
font-family: Arial;
text-align: center;
background-color: #AAE6FF;
height: 32px;
}
.ligne_impaire
{
font-weight : bold;
color: #747678;
font-size: 15px;
font-family: Arial;
text-align: center;
background-color: #D7F1FC;
height: 32px;
}
#image
{
width: 100%;
height: 500px;
margin-top: 50px;
text-align: center;
}
#monde
{
height: 500px;
width: 100%;
}
#footer
{
height: 30px;
margin-bottom: 2px;
width: 100%;
text-align: center;
color: black;
font-size: 10px;
padding-top: 10px;
} |
Merci d'avance pour votre aide