I am having a couple problems with what I am guessing is sequencing. I have several different events that perform a task and then refresh a portion of the screen using this code snippet:
What this does is retreive a chunk of HTML code and load it into a DIV tag for display. That works correctly. What I would like to do is run a regular javascript function after the HTML is loaded into the DIV. The javascript code essentially looks for SPAN tags with an ID of "DateField" and changes the date/time within from UTC to local date/time. I've tried using this code:
but that doesn't seem to work. I originally tried calling the function inside "RefreshComments()" function, but it seems the HTML DIV container doesn't get fully loaded until after the execution has already left the function.
So this comes down to finding away to fire the javascript function only after the JQuery function has finished updating the HTML property of the DIV tag. I'm having a similar problem with a .post() command, and I expect whatever the solution is to this problem can be used to resolve the other as well.