Missatges dinĂ nimcs funcionant correctament
diff --git a/main.php b/main.php
index cf88aa9..298753a 100644
--- a/main.php
+++ b/main.php
@@ -27,7 +27,7 @@
<div id="inner-container">
<h2>Hola <name id="user_name"><?=$user->nom()?></name>,</h2>
<h3>La teva víctima és:</h3>
- <div style="display:none;" id="state">0</div>
+ <div id="state">0</div>
<div class="victima">
<img width="300px" src="./imgs/<?=$victim->id?>.png" />
@@ -47,7 +47,8 @@
$.ajax({ url: "./php/checkrequests.php", data: { id: userid }, type: 'GET',
success: function(data) {
$("#state").load("./php/checkrequests.php?id=" + userid, function(response, status, xhr) {
- if (!mort) requested = check_requests(response, victimnom, victimid, userid);
+ console.log(response);
+ if (!mort) mort = check_requests(response, victimnom, victimid, userid);
else clearInterval(checking);
});
}});