Originally posted by Pedro Bruno:
Hello,
I realise that ajax is asynchronous but I hope this is not the reason for my issue.
It very well might be the reason. Without actually seeing the code you write to make the ajax calls it is hard to say. I suspect that it is because you are issues the calls back to back. The problem with that is the second ajax call might actually complete before the first one, depending on a whole lot of factors like network latency, database latency, whatever. If you need to ensure that one call happens before/after another call then you need to code it that way.
I don't know if you are using a javascript library or doing the ajax the old school way but
you should have some sort of callback method for when the ajax calls complete. Your updExtend() call should be placed in this on complete callback function for updUpdate(). That way you know for sure the updUpdate() is going to be called and complete before the updExtend() call ever fires.