I know this title says resolved but if you would like some help accomplishing the above task i can help.
function performTask()
{
request1() //this calls a function that inserts a span into the page
request2() //this calls a function that manipulates some data in the span
}
The above performTask() when run on IE will produce an error along the lines of the id requested does not exsist. Why would request2() get such an error, is simple, the browser has not had a chance to completely process request1() yet.
To properly see the problem insert the code: alert('testing') between request1() and request2(), By the time it takes you to press OK on the alert box request1() has completed and now the browser can properly run request2(). Please note that this example should be observered when using IE. It seems different browsers have coped with the time delay in different ways. FireFox processes the entire function code before running it and as a result it fails no matter what kind of delay you stick in the function, where as IE just runs through the code blindly one line at a time.
There are work arounds for all browsers, it all comes down to a time delay in the code.