i have a function which does some task.inside the function i have an ajax call. if the response obtained from ajaxcall is true the function should continue with the rest of the task.else it should stop at that point itself. But the above said thing is not happening instead the function is executed independent of ajax call. please help me out in this
function f1(id)
{
var test= id
var url="contentserver?pagename=mandatory@id"=+id;
var ajax=new Ajaxrequest(url,validatecallback);
ajax.doGet();
if(id==true){
return;
}
........(some code which has to carried out after the ajax call)
}
function validatecallback
{
this function gets the response for the above mentioned ajaxcall
we are setting a global variable(i.e id) here so that we can use that we can retrieve that in function f1
}