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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Author" content="Daniel Hagnoul" />
<title>Page type</title>
<style type="text/css">
body {
background-color:#696969;
color:#000000;
font-family:Arial, Helvetica, sans-serif;
font-size:medium;
font-style:normal;
font-weight:normal;
line-height:normal;
letter-spacing:normal;
}
h1,h2,h3,h4,h5 {
font-family:"Times New Roman", Times, serif;
}
div,p,h1,h2,h3,h4,h5,h6,ul,ol,dl,form,table,img {
margin:0px;
padding:0px;
}
p {
padding:6px;
}
ul,ol,dl {
list-style:none;
padding-left:6px;
padding-top:6px;
}
li {
padding-bottom:6px;
}
div#conteneur {
width:95%;
margin:12px auto;
padding:6px;
background-color:#FFFFFF;
color:#000000;
border:1px solid #666666;
font-size:0.8em;
}
div#affiche {
margin:12px;
border:1px solid #999999;
}
.clickable {
display:block;
width:50px;
height:50px;
margin:6px;
padding:4px;
border:1px solid red;
cursor:pointer;
}
.erreur{
/*background: url(images/wrong.png) center no-repeat;*/
background-color:#FFFFCC;
padding: 0 0 0 30px;
color: red;
display: none;
}
#lien_form {
cursor:pointer;
}
#IdFormulaire {
display:none;
}
</style>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#lien_form").click(function(){
if($("#IdFormulaire").is(":visible") == false) {
$("#IdFormulaire").slideDown();
} else {
$("#IdFormulaire").slideUp();
}
});
$("#IdFormulaire").submit(function(){
var boolOk = false;
if ($("#nom").val() == ""){
$("#nom").parent().next(".erreur").text("Veuillez entrer votre nom").fadeIn();
} else {
$("#nom").parent().next(".erreur").fadeOut();
}
//tester toutes les sources d'erreurs
//si ok, mettre boolOk=true;
if ( boolOk ){ //le formulaire ne sera pas envoyé tant que boolOk=false;
return true;
} else {
return false;
}
});
});
</script>
</head>
<body>
<div id="conteneur">
<a id="lien_form">[Accéder au formulaire]</a>
<form id="IdFormulaire" method="POST" action="?page=13">
<table style="margin:auto;padding-top:2px;">
<tr>
<td style="padding-top:2px;">Nom</td>
<td style="padding-top:2px;"><input type="text" name="nom" id="nom"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Prénom</td>
<td style="padding-top:2px;"><input type="text" name="prenom" id="prenom"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Date de naissance<br> (jj/mm/aaaa)</td>
<td style="padding-top:2px;"><input type="text" name="date de naissance" id="date" /></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Adresse complète</td>
<td style="padding-top:2px;"><textarea name="adresse" id="adresse" rows="2" cols="15" /></textarea></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Code postal</td>
<td style="padding-top:2px;"><input type="text" name="code_postal" id="code_postal"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Ville</td>
<td style="padding-top:2px;"><input type="text" name="ville" id="ville"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">Tel</td>
<td style="padding-top:2px;"><input type="text" name="tel" id="tel"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td style="padding-top:2px;">E-mail</td>
<td style="padding-top:2px;"><input type="text" name="email" id="email"/></td>
<td class="erreur"></td>
</tr>
<tr>
<td colspan="2" style="text-align:right;padding-top:10px;"><input type="submit" id="envoyer" value="Envoyer"/></td>
</tr>
</table>
</form>
<div id="affiche"></div>
</div>
</body>
</html> |