J'ai un div #container :
<div id="container">
<ul class="user-data" style="margin-bottom: 20px;list-style-type: none;">
<?php
$base = mysql_connect ('*****', '************', '***************');
mysql_select_db('*************', $base);
$sql = "SELECT * FROM wa_mur, wa_communaute WHERE id_membre=id ORDER BY date DESC;";
$req = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$nb = mysql_num_rows($req);
if ($nb == 0) {
echo '<div style="text-align: center;font-size: 11px;color: #666;">Aucune actualités pour l\'instant</div>';
}
else {
while ($data = mysql_fetch_array($req)) { ?>
<li class="user-item" style="float: left;padding: 13px 10px 10px;width: 460px;border-top: 1px solid #cecece;word-wrap: break-word;">
<div class="user-avatar float-l" style="margin-right: 10px;">
<a href="/<?php echo htmlentities(trim($data['pseudo'])); ?>"><img src="../img/upload/<?php echo htmlentities(trim($data['id'])); ?>-mini.png" width="50" height="50" alt="" /></a>
</div>
<div class="user-title" style="margin-bottom: 5px;font-weight: bold;">
<a href="/<?php echo htmlentities(trim($data['pseudo'])); ?>" style="color: #005B83;"><?php echo htmlentities(trim($data['prenom'])); ?> <?php echo htmlentities(trim($data['nom'])); ?></a>
</div>
<div class="user-content" style="margin-left: 60px;">
<p><?php echo htmlentities(nl2br(trim($data['poster']))); ?></p>
</div>
<div class="sub-userContent" style="margin-left: 60px;">
<div class="sub-userFooter" style="margin-top: 6px;">
<p class="size11" style="color: #777;"><a href="" class="sub-userFooter-link" style="color: #0D5085;">J'aime</a> - <a href="" class="sub-userFooter-link" style="color: #0D5085;">Commenter</a> - <?php echo getRelativeTime($data['date']); ?></p>
</div>
<ul class="sub-userData" style="list-style-type: none;">
<li>
<i class="sub-userArrow" style="background: url(../img/top-sub-user.png);background-repeat: no-repeat;height: 5px;display: block;margin-top: 5px;margin-left: 60px;"></i>
</li>
<li class="sub-userItem" style="background-color: #B4CBDB;margin: 0;padding: 4px;">
<img style="margin-bottom: -3px;" src="../img/upload/<?php echo $_SESSION['id']; ?>-mini.png" width="32" height="32" alt="" />
</li>
</ul>
</div>
</li>
<?php }
}
mysql_free_result ($req);
mysql_close();
function getRelativeTime($date)
{
$date_a_comparer = new DateTime($date);
$date_actuelle = new DateTime("now");
$intervalle = $date_a_comparer->diff($date_actuelle);
if ($date_a_comparer > $date_actuelle)
{
$prefixe = 'Dans ';
}
else
{
$prefixe = 'Il y a ';
}
$ans = $intervalle->format('%y');
$mois = $intervalle->format('%m');
$jours = $intervalle->format('%d');
$heures = $intervalle->format('%h');
$minutes = $intervalle->format('%i');
$secondes = $intervalle->format('%s');
if ($ans != 0)
{
$relative_date = $prefixe . $ans . ' an' . (($ans > 1) ? 's' : '');
if ($mois >= 6) $relative_date .= ' et demi';
}
elseif ($mois != 0)
{
$relative_date = $prefixe . $mois . ' mois';
if ($jours >= 15) $relative_date .= ' et demi';
}
elseif ($jours != 0)
{
$relative_date = $prefixe . $jours . ' jour' . (($jours > 1) ? 's' : '');
}
elseif ($heures != 0)
{
$relative_date = $prefixe . $heures . ' heure' . (($heures > 1) ? 's' : '');
}
elseif ($minutes != 0)
{
$relative_date = $prefixe . $minutes . ' minute' . (($minutes > 1) ? 's' : '');
}
else
{
$relative_date = $prefixe . ' quelques secondes';
}
return $relative_date;
}
?>
</ul>
</div>
Il est recharger au clic d'un lien, voici le code ajax : [javascript]
J(".refresh").click(function() {J('.load-refresh').show();setTimeout(function() {;J.ajax({url: "../include/mur.inc.php",success:function(retour){J('#container').html(retour);J('.load-refresh').hide();} }); },1000);});
[/javascript]
Quand je clique sur le lien l'image :
<img style="margin-bottom: -3px;" src="../img/upload/<?php echo $_SESSION['id']; ?>-mini.png" width="32" height="32" alt="" />
ne s'affiche plus, et quand je réactualise la page avec le navigateur, l'image apparaît
Merci beaucoup si vous trouvez ce problème