Call function after the function above has completed
<p>Can anyone assist me in getting a function to be called, in this example the second() after the function before has finished? The first function called contains an ajax call.</p>

<pre><code>function requestPost(postID, clientId) {

    first("path", { postID: postID, clientId: clientId});
    second(); // this is where I want to call the second() but only the first() has completed.

}
</code></pre>

<p>Thanks</p>
