Im trying to sort this around, im making an ajax requests of get type, and the page will be returning many responses, OK is one of those, is the page returns OK then I need to proceed for form submitting, else I need to halt the form submission, but Im unable to access the data out side of the function, it is available inside the fall back function alone, is it due to asynchronous mannerism?, can some one assist me to get out of this?
$.get('ajax.html',function(data){
//some code here
});
if(data == 'ok'){return true; } else {return false;}