get return value from function jquery code example
Example: $.get jquery return value
function showGetResult( name )
{
var result = null;
var scriptUrl = "somefile.php?name=" + name;
$.ajax({
url: scriptUrl,
type: 'get',
dataType: 'html',
async: false,
success: function(data) {
result = data;
}
});
return result;
}