Answers for "javascript ajax receive multiple values"

0

javascript ajax receive multiple values

// At the time of writing best bet is to do this:

// Construct a string from your response and separate the items with a comma
// Lets say your request sends response a string like this: '1,2'

$.ajax({
	url: '<myUrl>',
	//data: { "id": id },
	//async: false,
	success: function (data) {
		var response = data.split(",");
		var first = response[0];
      	var second = response[1];
      	// ... etc.
	}
}
Posted by: Guest on December-22-2020

Code answers related to "javascript ajax receive multiple values"

Code answers related to "Javascript"

Browse Popular Code Answers by Language