Sure, just use javascript variables.
var ajaxMethod = "POST";
var ajaxUrl = "save.php";
$.ajax({
type: ajaxMethod,
url: ajaxUrl,
data: dataString,
success: function(chat_list) {
}
});
solved Two URLs with same AJAX structure