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.
}
}
Also in JavaScript:
- javascript get dictionary values
- on change jquery
- material in angular 4
- js set iframe src
- js unshift vs push
- looping in javascript
- javascript detect escape key
- angularjs focus not working
- how to place a line break in react native
- How to rewrite a function using arrow function syntax
- set stange beckground color easeljs
- Sum of all the multiples of 3 or 5
- 3 letter months javascript array
- javascript substring last character
- es6 array sum javascript
- angular 9 form value changes
- javascript play audio
- how to add changes every time you route navigate to page in angular
- args slice discord.js
- react three fiber
- javascript check if file exists on server
- react state array push
- get data attribute javascript
- transpose an array in javascript