onclick function sometimes doesn't fire its event
When a user clicks on a specific div, the code asks that it should fire an event - an alert to simplify; in addition in intervals of 1 second the program updates the content of the divs (here it only checks the divs content and sees that there are no changes).
The problem is that, when the string "new match" is clicked, it should be called the function init_match(), but sometimes (about ~1/10) nothing occurs - i.e. the onclick event isn't fired, the other times everything goes well. This is very strange...
In a short code I can show that problem:
This is really very strange! I don't know how to avoid this problem...
<span id="init_panel" style="visibility:visible; position:absolute; left:0px; top:0px;"></span>
var div = document.getElementById("init_panel");
var HTML = "<div class='links' onclick='init_match();'><font color='black'><b>new match!</b></font></div><br />";
I want to update the links in intervals of 1 second, and that the links still work...
The corresponding jsfield is in:
Thank you in advance for any help or comment!