I have the following javascript code:
function ClickButtons() { document.getElementById('Button1').click(); document.getElementById('Button2').click(); }
Button2 is pressed. If I cancel the order of the operators, then Button1 (which will be called 2nd) works.
FYI (do not think that this affects this problem, here for further information): clicking the button makes ajax updates / partial pages (they call data services and fill in the data on the page)
EDIT: The setTimeout solution works, but lowers the performance limit. I looked a little, and the two buttons are the asp.net buttons and are inside the update panels. If I click on them sequentially, they work fine, but if I click one and then quickly press the second (before the first is finished), then the second will work, and the first will fail. Is this apparently a problem with update panels and asp.net? Is there anything I can do on this front to enable the above javascript and avoid the setTimeout option?
source share