Gowtham,
I don't know if I posted to the wrong forum or not but I don't think I am not using ej2. I think I am using ej. Is there an equivalent to this? This is what I get when I attempt to run the following.
Code:
var diagramElement = document.getElementById('Diagram');
var diagram = diagramElement.ej2_instances[0];
var JSON = diagram.saveDiagram();
Result:
Uncaught TypeError: diagramElement.ej2_instances is undefined
I have also tried this (using the method to get the diagram that I have been using everywhere else in my JS)
Code:
var diagram = $("#Diagram").ejDiagram("
var JSON = diagram.saveDiagram();
Result:
Uncaught TypeError: diagram.saveDiagram is not a function