I have a table in which a table row tag is decorated with an onclick () handler. If you click a line at any time, it will load another page. In one of the line items, this is a binding, which also leads to another page.
The behavior is preferably that if they click on the link, "delete.html" is loaded. If they click elsewhere in the line, "edit.html" is loaded.
Problem lies in the fact that sometimes (according to users) both the link and onclick () are launched at the same time, which leads to a problem at the back of the code. They swear that they do not double click.
I'm not well versed in events related to Javascript events, processing, and even knowing where to start with this bizarre problem, so I ask for help. Here is a fragment of the displayed page showing a line with an inline link and a script tag associated with it. Any suggestions are welcome:
<tr id="tableRow_3339_0" class="odd"> <td class="l"></td> <td>PENDING</td> <td>Yabba Dabba Doo</td> <td>Fred Flintstone</td> <td> <a href="/delete.html?requestId=3339"> <div class="deleteButtonIcon"></div> </a> </td> <td class="r"></td> </tr> <script type="text/javascript">document.getElementById("tableRow_3339_0").onclick = function(event) { window.location = '//edit.html?requestId=3339'; };</script>
source share