Reputation: 33
I used the Load method jquery to change the content of a div.
function charger(id,date_fin) {
$(document).ready(function () { // On verifie que la page est chargée
$('#contenue').load('include/detail.php',{id:id,date_fin:date_fin});
});
}
<?php echo '<a href="#" onclick="charger('.$valeur["ID"].','.$d_fin.')">lien</a>';
The problem is that I can not recover the value of parameter $d_fin
,
the date variable, it is not the case for the variable $id
is integer in the page "detail.php".
Upvotes: 0
Views: 869
Reputation: 3425
$(document).ready(function () {
}
Is only called once when the page is loaded. Try removing it like this:
function charger(id,date_fin) {
$('#contenue').load('include/detail.php',{id:id,date_fin:date_fin});
}
<?php echo '<a href="#" onclick="charger('.$valeur["ID"].','.$d_fin.')">lien</a>';
Upvotes: 1