Endnu et spørgsmål om opdatere en chat uden blink
Hej, jegh ar prøvet og prøvet, men kan ikke, har kigget og kigget, men kan ikke finde noget jeg rigtig kan bruge, har prøvet alle de metoder jeg kender, men jeg kan ikke :s Jeg skal ahve min chat til at opdatere uden at blinkeChat.php
kode start -->
<?
session_start();
if(session_is_registered("brugernavn")) {
?>
<iframe name="room" width="500" height="500" scrolling="no" frameborder="0" src="room.php"></iframe>
<?
}
?>
<-- kode slut
og så Room.php
kode start -->
<?
session_start();
if(session_is_registered("brugernavn")) {
include 'db.php';
?>
<?
if($_GET[plads] != ""){
mysql_query("UPDATE test SET felt= '$_GET[plads]' Where brugernavn = '$_SESSION[brugernavn]' AND online = 'ja'") or die(mysql_error());
}
?>
<html>
<head>
<style type="text/css">
#board {
border: 1px solid #000000;
border-collapse: collapse;
}
#board td {
width: 60px;
height: 75px;
border: 1px solid #000000;
text-align: center;
vertical-align: middle;
cursor: pointer;
}
</style>
</head>
<script type="text/javascript">
function test(){
<?
$sql = mysql_query("SELECT * from test WHERE online = 'ja' order by brugernavn");
while($ryk = mysql_fetch_array($sql)){
?>
document.getElementById('<?=$ryk[felt]?>').innerHTML = "<img border='0' src='mand.gif' width='54' height='71'><br><?=$ryk[brugernavn]?>";
<?}?>
}
</script>
<body onload="test();">
<table id="board" bgcolor="#FFFFFF" border="0" style="border:1px solid #000000;">
<tr>
<td width="59" height="76" valign="middle" id="1" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="2" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="3" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="4" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="5" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="6" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="7" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
</tr>
<tr>
<td width="59" height="76" valign="middle" id="8" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="9" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="10" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="11" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="12" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="13" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="14" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
</tr>
<tr>
<td width="59" height="76" valign="middle" id="15" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="16" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="17" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="18" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="19" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="20" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="21" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
</tr>
<tr>
<td width="59" height="76" valign="middle" id="22" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="23" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="24" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="25" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="26" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="27" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="28" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
</tr>
<tr>
<td width="59" height="76" valign="middle" id="29" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="30" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="31" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="32" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="33" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="34" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
<td width="59" height="76" valign="middle" id="35" onclick="location.href='room.php?plads='+this.id;" align="center"><img border="0" src="no_fir.gif" width="54" height="71"></td>
</tr>
</table>
<?}?>
<-- kode slut
Hjææælp :s kan ikke få lavet så det ikke blinker :(