I am trying to verify an id using javascript ajax.
An onclick event triggers the ajax call from within a function:
verified = verify_id($('#set_ex_id').val());
alert('Verified: ' + verified);
The verify_id function, upon success has this:
result = data;
alert("RESULT 1: " + result);
return result;
The alert Result 1 is 1, but the alert Verified is undefined