I have some functions that I am calling and they take some time (milliseconds), but I don't want the page to display until these functions have completed. Right now, I can tell that the page loads and then the scripts eventually complete.
Right now, I am calling the functions in the body onload.
Also, another issue I may have is that I need to access div elements in the html content, can I do that in my body onload function (getElementById('somDiv')?
Here is the workflow.
Make a call to getElementById('someDiv') to get an element from the page.
Invoke the function someFunc, this function is in the body onload=someFunc()
Wait until someFunc is finished
Display page to user once my function has completed.