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; }

$.get jquery return value

Similar Code Examples