I have problem that I can't call function of parent window in child window.
var value = "test";
function drawChart() {
myWindow = window.open("", "Chart", "width=500, height=500");
myWindow.console.log(parent.value);
myWindow.parent.createGraph();
}
function createGraph(){
...
}
I can access global variable value, but not call function createGraph. I am getting error:
Uncaught TypeError: myWindow.createGraph is not a function
I moved all javaScript in head, but still not working.