score:2
Accepted answer
You're getting a bit mixed up with asynchronous nature of AJAX.
The AJAX event is being fired, but it won't be causing any pause in the execution of your code, as such, you need to implement a callback.
This code isn't particularly nice, but it should give you an idea of how the data needs to be handled.
function setJSONSer() {
formData = {
'Email': 'clientlink@russell.com',
'Password': 'russell1234',
'URL': getVaria()
};
$.ajax({
url: "/APIWebService.asmx/AnalyticsDataShowWithPost",
type: 'POST',
data: formData,
complete: function(data) {
console.log("Successfullly set JSON!");
getJSONSer();
}
});
}
function getJSONSer()
{
$.ajax({
url: "/APIWebService.asmx/AnalyticsDataShowWithPost",
type: 'GET',
complete: function(data) {
//alert("This is Get JSON Out "+JSON.stringify(data));#
Load(data);
}
});
}
function BeginLoad()
{
setJSONSer();
}
function Load(data)
{
setJsonSer();
var labels = new Array();
var values = new Array();
var catogories = new Array();
var arrayOfArray = new Array();
var rowData = "return value of JSON.stringify(data)";
}
BeginLoad();
Source: stackoverflow.com
Related Query
- Assigning JSON value to a Variable that Resides Outside JavaScript Function
- Passing a JavaScript function from JSON encoded PHP
- Sending javascript function with JSON is possible?
- passing formatting JavaScript code to HighCharts with JSON
- send javascript function in PHP to be formatted as JSON (highcharts)
- Use variable from inside $when...then() outside the function
- tool that shows javascript errors in code
- Variable changing value at each function call
- How to make Javascript file use variable that was sent to Pug view
- Use django variable (array of elements from sqlite3 database) inside javascript embedded code
- JSON.parse: unexpected non-whitespace character after JSON data in javascript
- Optimize JavaScript DrillDown code
- Highcharts how to use JavaScript variable as series data source?
- Serializing a function as a parameter in json using C#
- Dynamic PDF from html that contains Javascript
- JavaScript code inside TypeScript file .ts not working
- javascript variable not works in Highchart
- How to fill dynamic json value in drill down highchart
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- How to access angular scope variable in JavaScript file
- Passing data to highcharts from javascript array or variable
- what means ${demo.css} in example files of highcharts ? That piece of code seems to be literal
- Append a jQuery variable to a click event handler function
- Passing JSON in variable to HighCharts
- Posted value is not getting in the where clause with json highcharts-php and mysql
- Highcharts Graph displaying 0 value continuously : Javascript Array
- Pass a textfield value from php to javascript
- Change color code on colum, depending on data value (highchartJS)
- Getting data from Postgres in JSON format in ROR into a Highcharts javascript
- passing json values to highcharts from .net code behind
More Query from same tag
- highchart with numberformat (unit)
- Custom button next to exporting overlaps on the To: of the range picker
- 3d chart for Highcharts with legends
- highcharts animation multiple spline per second
- Creating array from javascript object
- Creating piecharts using Highcharts.js
- Highchart performance slow on plotting live data
- Populate HighChart Data From Rails View
- Setting the length of the X-Axis of a Highchart to be 24 hours from time of first data point with less than 24 hours of data to display
- highcharts: Other settings for y-axis. Dealing with large numbers
- Javascript convert 2D array to array of pairs
- Chart not fill all the page in A4 format when printing. (highcharts)
- HighCharts/HighStocks: Pie graph with Highstock
- Highcharts 3D Scatter Plot, pop up's and links after rotation
- Loading Highcharts from MySQL using Java
- fix a number of labeles on xAxis highcharts
- Highchart Funnel for Angular
- Highcharts hover xAxis Labels Unique Value
- Highcharts: Add point without connecting series
- HighCharts - how to align (justify) xAxis labels left and right
- Angular child component doesnt recognize input changes
- How to add arrow to end of line while using type scatter
- Highchart Polar chart 2 nested circle
- Highcharts-Vue chart options does not change values after it is set
- highcharts column graph tooltip need to close when mouseout the cursor from the graph
- Change marker width and height in scatter chart
- Highcharts: Column chart has banding as a result of inconsistent spacing
- Show only 1 Child node of Treemap HighCharts
- How to find the linkedSeries in Highcharts
- Add dataLabel to Area chart in Highcharts.js