I'm working on a wordpress editor for my blog, and need to be able to make sure that the function doGET() is finished before I click the save button with javascript or jquery. The doGET function might take a tad of time as I'm in a country with incredible slow internet connection...
$('#xmlbutton').click(function() {
doGET();
document.getElementById("save-post").click();
})