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
| <?php require_once('construire.php') ; ?>
<div class="container">
<script>
"use strict";
function ficheclient( client_id )
{
if (client_id == "") {
$("#txtHint").html("");
} else {
$.ajax({
method: "POST",
url: "getuser.php",
data: { client_id : client_id }
})
.done(function( retour_html ) {
$("#txtHint").html( retour_html );
})
.fail(function() {
alert( "error ficheclient" );
});
}
}
$(document).ready(function(){
$("#txtHint").on( 'click', '.client_societe', function(){
var varsociete = $(this).data('varsociete');
console.log( 'click : ' + varsociete ); // TEST
new_varsociete( varsociete );
});
});
function new_varsociete( varsociete )
{
$.ajax({
method: "POST",
url: "menu/condition.php",
data: { varsociete : varsociete }
})
.done(function( retour_html ) {
console.log('retour_html : ' + retour_html); // TEST
var varsociete = retour_html;
})
.fail(function() {
alert( "error new_varsociete" );
});
}
</script>
<div id="txtHint">
<div class="alert alert-info">
<strong>Info:</strong> La fiche client va être chargée ici une fois une fois que vous aurez sélectionné votre client.
</div>
</div>
<?php include '../Include/footer.php' ; ?>
</body>
</html> |