I really searched long on the internet for this issue. I just want to run code when a function which is called before is over. Let me explain on this example:
var id=0;
function refreshID(){
//refresh the div
}
function postID(){
//some code
refreshID();
id=1;
}
By calling the function postID, the function refreshID will executed, then the variable id is set to 1. But I think the variable is set to 1 before the function refreshID() is fully executed. So my question is: How to run code (In this case change the value of the variable), when another function is over, when its completely executed.
regards