Accessing the DOM and functions of other windows.
I need some sort of communication between two windows. What is the syntax for accessing the DOM of another window, or preferably calling a function in another window?
2 Answers
-
I have figured it out.
Titanium.UI.getWindows()[1].getDOMWindow().window2Function(param,param);
-
I don't know about accessing the DOM, but if you just want to call a function in another window, you can do this by events. Simply fire an event in one window, the window you want the function called in can listen and the event listener can then call the function. Events were talked about in this blog entry.