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 Articles
- 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
- How to obtain HighCharts series "id" from "series" elements?
- Add new data to a Highchart pie chart dynamically
- Marker should follow Cursor
- Strip/escape special characters from Google Spreadsheet field before passing data to Highcharts Graph
- Generate JSON files for Hightcharts with PHP from a TCP string
- Highcharts - Redundant Y Axis Point Markers (Any insight welcome!)
- Hide or disable navigator handles in highcharts
- How to add opacity in spline chart
- HighCharts - setTitle() ignored when exporting chart
- making series in Highcharts clickable
- HighCharts Not Displaying Correctly
- Highcharts data label vertical alignment - bug
- How to use this highchart map in reactJS
- Highcharts Map with React TypeScript
- Creating a 1D chart using Highcharts
- Unable to plot dynamically updating y-values on Highcharts spline plot
- how to show data for single day in graph using php mysql
- Representing multiple dataseries with fill opacity highcharts
- highcharts marker: {radius: 10} on individual data points makes certain data points disappear?
- What is the simple way to hide series data in HighStocks Navigator