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
| <html>
<head>
<title>Calendrier par Semaine - Semaine</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
<script type="text/javascript">
$(function() {
var clients = [
{ nom: "DUPONT", prenom: "Pierre", telephone: "0611223344"},
{ nom: "DURANT", prenom: "Paul", telephone: "0655667788"},
{ nom: "MARTIN", prenom: "Jacques", telephone: "069900112233"}
];
$( "#client-nom" ).autocomplete({
minLength: 0,
source: clients,
focus: function( event, ui ) {
$( "#client-nom" ).val( ui.item.nom );
return false;
},
select: function( event, ui ) {
$( "#client-nom" ).val( ui.item.nom );
$( "#client-prenom" ).val( ui.item.prenom );
$( "#client-telephone" ).val( ui.item.telephone );
return false;
}
})
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.nom + " " + item.prenom + "<br />" + item.telephone + "</a>" )
.appendTo( ul );
};
});
</script>
</head>
<body>
<div align="center">
<form action="actions.php" method="post">
<table border="1">
<tr>
<td align="right">Nom :</td>
<td align="left">
<input id="client-nom" />
</td>
</tr>
<tr>
<td align="right">Prénom :</td>
<td align="left"><input id="client-prenom" type="text" maxlength="255" size="30" /></td>
</tr>
<tr>
<td align="right">Téléphone :</td>
<td align="left"><input id="client-telephone" type="text" maxlength="10" size="10" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="Ajouter" /></td>
</tr>
</table>
<input type="hidden" name="action" value="Ajouter_Reservation" />
</form>
</div><br />
</body>
</html> |
Partager