I have a <td> that gets updated via an ajax call, upon the return of that call, I need to run a function that updates the style based on the innerHTML value. If I add an alert after the ajax return and before the call to the update function, it works correctly. However without the alert, the value that is passed in is null. This leads me to believe that I need time for the HTML document to be updated. I have tried the code below to delay, but this does not work either.
I have also tried putting the checkUpdate function into the setTimeout, but I can't get the arguments to pass in.
Can anyone help?
Thanks in advance.
var a = 0;
var a = a + 1;
//set delay of 1ms to let response load