jquery ajax call success, como faço para alterar uma variável global na função JavaScript do wrapper?

function ajax_test(str1){ 
  var url = "None" 
  jq.ajax({
    type:'post', 
    cache: false, 
    url: 'http://....' + str1, 
    success: function(data, status, xhr){ 
      url=data; 
    }, 
    error: function (xhr, status, e) {  
    }, 
    async: true, 
    dataType: 'json' 
  }); 
  return url 
} 

Como posso definir a variável globalurl ser o retorno de dados ajax de sucesso?

questionAnswers(2)

yourAnswerToTheQuestion