Answers for "$.get jquery return value"

-1

$.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;
}
Posted by: Guest on May-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language