Hi,
How can I call a method in child window from parent window in adobe air using javascript. In the following example I need to call mytest() function in
child.html from parent.html file.
Thanks,
ASM
//parent.html
<HTML><HEAD>
<script>
var initOptions = new air.NativeWindowInitOptions();
initOptions.type = air.NativeWindowType.NORMAL;
initOptions.systemChrome = air.NativeWindowSystemChrome.STANDARD;
var bounds = new air.Rectangle(300, 300, 600, 500);
var html2 = air.HTMLLoader.createRootWindow(false, initOptions, false, bounds);
var urlReq2 = new air.URLRequest("child.html");
html2.load(urlReq2);
html2.stage.nativeWindow.activate();
html2.window.mytest(); //NOT WORKING
</script>
</HEAD><body></body></HTML>
// child.html
<HTML><HEAD>
<script>
function mytest()
{
air.trace("in child window");
}
</script>
</HEAD> <body></body></HTML>