wait for ajax request then finish the rest ( jQuery )
- by user1725155
I have a peace of jquery code:
var new = checkCP(somedata);
if(new=="hi"){
alert("Welcom");
}
function checkCP(jsData){
$.ajax({
type: "POST",
url: "Process.php",
data: jsData,
dataType: "json",
success: function(data){
…