Commit 48a861dc authored by Markus Bergt's avatar Markus Bergt

added real logic to update

parent 0e010bcf
......@@ -8,7 +8,14 @@ $(document).ready(function() {
function UseData(data){
var obj = jQuery.parseJSON(data);
alert(obj.UsersTable);
if(!!obj.UsersTable)
{
$('#onlineStatus').innerHTML(obj.UsersTable);
}
if(!!obj.newMessages)
{
$('#chatbody').append(obj.newMessages);
}
}
$('#showRegBtn').click(function(){
......
......@@ -60,14 +60,14 @@ else{
</div> -->
<table class="table">
<table class="table" id="onlineStatus">
<?php echo UserTable();?>
</table>
</div>
</div>
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 col-xs-offset-0 col-sm-offset-3 col-md-offset-3 col-lg-offset-2">
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 col-xs-offset-0 col-sm-offset-3 col-md-offset-3 col-lg-offset-2" id="chatbody">
<?php
$result = mysql_query("SELECT MAX(id) AS id FROM chat");
$chat = mysql_fetch_array($result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment