Bonjour voici le probléme que j ai , sur une messagerie online cela fonction bien quand je recois mon premier message le liens apparaît mes et j'aimerais le faire disparaître quand l'on clik dessus a chaque arrivée de nouveaux message voici le code arrivée et le code lecture.
je cale un peux a ce niveau , j ai ajouter un champs open mais je trouve pas la solutions seriez vous m'aidez svp merci d'avance
le code d'arrivée du message qui affiche le liens pour ouvrire la fenetre de lecture
$nb_mess = mysql_query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
$nb_mess = mysql_query("SELECT * FROM chatonline WHERE dest='$pseudom'") or die (mysql_error());
$nb_mess_i = mysql_num_rows($nb_mess);
if($nb_mess_i > 0)
{
echo "<bgsound src='design/chat.wav'>";
}
if(!empty($nb_mess_i))
{
echo"<center><b><a href=\"#\" onClick=\"window.open('messachat1.php??expe=$expe','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0, copyhistory=0, menuBar=0, width=400, height=120, right=1, top=0');return(false)\">Message Reçu</a></b></center>";
}
Fenetre de lecture du message
<?php
session_start();
require_once'config.php';
$chat = mysql_query("SELECT expe, messy FROM chatonline WHERE dest='".$_SESSION['login']."' ORDER BY id_chat ASC");
?>
<html>
<head>
<title>Dialogue-Priver</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="5;url="javascript:navigator.url">
<style type="text/css">
BODY
{
scrollbar-face-color: #0099CC;
scrollbar-shadow-color: #3333CC;
scrollbar-highlight-color: #CCCCFF;
scrollbar-3dlight-color: #99CCCC;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #FFFFFF;
scrollbar-arrow-color: #FFFFFF;
}
</style>
<SCRIPT language=JavaScript>
var version = "other"
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
else if (browserName == "Netscape" && browserVer < 3) version = "n2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) version = "e4";
else if (browserName == "Microsoft Internet Explorer" && browserVer < 4) version = "e3";
var y = 0;
var test = 0;
function scroll_bas() {
if (version == "n2" || version == "n3" || version == "e4"){
//vous devez régler le 1000 qui suit si votre texte est plus grande que 1000 pixels
if (y < 1000) {
window.scroll(0,y);
y = y + 25;
//régler le 0 ci-dessous pour la vitesse de descente
if (test==0) {setTimeout('scroll_bas()', 0);}
}
}
}
</SCRIPT>
</head>
<body onload="scroll_bas();">
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<?php while ($rs1 = mysql_fetch_array($chat))
{
$expe = $rs1['expe'];
$messy= $rs1['messy'];
echo"<left><b>$expe</b><a href=\"#\" onClick=\"window.open('detailspopup.php?det=$expe','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=600, height=550, right=1, top=0');return(false)\"><img src=\"design/voir.gif\" width=\"20\" heigth=\"25\" border=\"0\" title=\"Profil\"></a>
<a href=\"#\" onClick=\"window.open('messa.php?dest=$expe&chat=$chat','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=400, height=200, right=1, top=0');return(false)\"><img src=\"design/chat.gif\" width=\"15\" heigth=\"15\" border=\"0\" title=\"chat\"></a>";
echo" => $messy </left><br />";
}
$chat2 = mysql_query("select count(id_chat) AS nb_mess from chatonline");
$nb_mess = mysql_result($chat2,0,"nb_mess");
if($nb_mess >=6){
$chat3 = mysql_query("select min(id_chat) AS min_mess from chatonline");
$min_mess = mysql_result($chat3,0,"min_mess");
$chat4 = mysql_query("delete from chatonline where id_chat=".$min_mess."");
}
?>
</table>