J'ai essaye de faire un popup dynamique grâce à un Javascript que vous m'avez conseillez sur un autre sujet.
Tout marche bien mais mon soucis, c'est que j'essaye de le faire apparaître quand je clique.
Mais quand je clique, j'ai toujours le dernier enregistrement qui apparaît dans le popup.
J'ai compris pourquoi cela ne marchait pas, car le popup ne peut pas savoir de quel enregistrement je parle, mais je ne sais pas
comment faire pour faire passer une variable ou une quelconque information qui permettrait à mon popup de savoir quel enregistrement je veux qui l'affiche.
( Vu que je reste sur la même page )
Si quelqu'un pouvait me donner un coup de main, j'y suis depuis hier c'est la galère.
Merci à vous voici où j'en suis:
while ($result_news = mysql_fetch_array($retour_news)){?>
<a href="#" onClick="javascript: document.getElementById('showimage').style.display='block';"><span style="font-size:16px;"><strong><?php echo html_entity_decode($result_news['titre']);?></strong></span> - <span style="font-size:12px;"><?php echo $result_news['date_fr'];?></span></a>
<br /><br />
<div id="showimage" style="position:absolute;width:250px;left:250px;top:250px; display:none;">
<table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"
height="36px">
<tr>
<td id="dragbar" style="cursor:hand; cursor:pointer" width="100%" onMousedown="initializedrag(event)"><ilayer width="100%" onSelectStart="return false"><layer width="100%" onMouseover="dragswitch=1;if (ns4) drag_dropns(showimage)" onMouseout="dragswitch=0"><font face="Verdana"
color="#FFFFFF"><strong><small><?php echo html_entity_decode($result_news['titre']);?></small></strong></font></layer></ilayer></td>
<td style="cursor:hand"><a href="#" onClick="hidebox();return false"><img src="images/close.gif" width="16px"
height="14px" border=0></a></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
<!-- PUT YOUR CONTENT BETWEEN HERE -->
<span style="font-size:16px;"><strong><?php echo html_entity_decode($result_news['titre']);?></strong></span> - <span style="font-size:12px;"><?php echo $result_news['date_fr'];?></span></a>
<br /><br />
<?php echo $result_news['texte'];?>
<!-- END YOUR CONTENT HERE -->
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
?>
</div>