User-153404742 posted
so I have the following code:
callback: function (result) {
if (result) {
switch (action) {
case "move":
document.getElementById('<%= btnTrigger.ClientID%>').click();
console.log("Moved file");
console.log(JSON.parse('<%=jsonString%>'));
break;
}
what's happening is that btnTrigger click even takes a few seconds to complete and the last step in that action is resetting the jsonString ojbect. However, btnTrigger is an asyncpostback trigger event so JSON.parse('<%=jsonString%>') data is
still from the old jsonString object. Is there a way to await the btnTrigger to complete before performing JSON.parse on the jsonString object?