1-Timer launch an AJAX request to read a .txt file (500ms).
2-AJAX response is copied to array*.
3-Old position is read from textbox and cleared from the grid, according to ID ($u,$i).
4-Array is copied into textbox.
5-New position is updated with player image.
*removes any free spaces from the string, in case coordonates are below 10.
When a player moves, it copies the new position into an iFrame form, submitted to a PHP file writing into the same .txt file.
Everything works great as long as we stay in the (>10,>10) area. Once any coordonates goes below 10. Coordonates DOES update into the textbox but the character image will not update anymore.
I've tried alerting(IDs) to notice any disparity but I... can't figure... Any help is appreciated, here's the related code:
echo("<td id='".$u.",".$i."' onClick='move(this.id);' style='font-size:12px;width:30px;height:30px;'> </td>");
I've tried to take most of the unrelated code out. Just ask if you need any more info orthe full code.You can also take a look at what I have yet:
If you click Play X, you should be able to move your dot in adjacent squares, though only the bottom right corner works correctly. Also, bugs might ruin further display, lol.
I'll stop talking and let you work, now. Thanks in advance!