Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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.
	}
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript dom manipulation 
Javascript :: react js if statement 
Javascript :: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. 
Javascript :: print js example 
Javascript :: javascript select letter in string 
Javascript :: how to make data toggle=modal always active 
Javascript :: react table className 
Javascript :: joi.validate is not a function stack overflow 
Javascript :: javascript foreach object 
Javascript :: get value from input by id in angular 
Javascript :: draft js insert text example 
Javascript :: React S3 Bucket 
Javascript :: is an Angular component, then verify that it is part of this module. 
Javascript :: _.extend 
Javascript :: window.open function 
Javascript :: Create Dark And Light Mode Website Using jQuery 
Javascript :: how to display image in html from json object 
Javascript :: javascript array join last element with and 
Javascript :: sort string mixed with numbers javascript 
Javascript :: javascript sleep one second 
Javascript :: jquery button click confirm and validate before submit 
Javascript :: axios cors http localhost forbidden 
Javascript :: return observable from function angular 
Javascript :: cheapest node js hosting 
Javascript :: promise javascript 
Javascript :: object loop javascript 
Javascript :: regex number 
Javascript :: jquery send to another page 
Javascript :: dynamic input fields with radio button 
Javascript :: sintax arrow function in javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =