[jQuery] Slightly OT: javascript and AJAX response 'concurrency'
I have a function which generates an AJAX request to retrieve information.
The display of this information requires modification of the interface - the structure of the function is roughly:
<br style="font-family: courier new,monospace;">
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; font-family: courier new,monospace;" class="gmail_quote">function getInfo() {
do AJAX request, success callback is onAjaxResponse
setup interface to display data
}
function onAjaxResponse() {
add data to the interface
show interface
}<br clear="all"></blockquote>
Is it guaranteed that onAjaxResponse() will not execute until getInfo() has returned?
The interface *must* be setup before it is shown, so if this guarantee is not there I must set up the interface in the response callback.
A test in Firefox shows that this works but I'm not sure of what to search for to find out if it is guaranteed.
Thanks
--rob
--
Rob Desbois
Eml: <a href="mailto:rob.desbois@gmail.com">rob.desbois@gmail.com</a>