24 get jquery return value

Solutions on MaxInterview for 24 get jquery return value by the best coders in the world

showing results for - " 24 get jquery return value"
Angelo
19 Oct 2016
1function showGetResult( name )
2{
3     var result = null;
4     var scriptUrl = "somefile.php?name=" + name;
5     $.ajax({
6        url: scriptUrl,
7        type: 'get',
8        dataType: 'html',
9        async: false,
10        success: function(data) {
11            result = data;
12        } 
13     });
14     return result;
15}