Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

How to pass json file name dynamically

$
0
0

@Shivesh wrote:

for loading of diagram i am passing json file name to getjson method that is hard coded,but i want it to be dynamic, means when we pass json file name dynamically at run time, it should load that json file and generate diagram.
LoadJsonData(“audit_GetLog_1.json”);\- how can we paas this parameter dynamically.
function LoadJsonData(total) {
jQuery.getJSON(total, loadjson);
//jQuery.parseJSON(total, loadjson);
}
function loadjson(jsondata) {
// create the model from the data in the JavaScript object parsed from JSON text

        nodeDataArray1 = jsondata["nodeDataArray"];
        linkDataArray1 = jsondata["linkDataArray"];
        myFunctionmain();
        init();
    }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles