Skip to content

Instantly share code, notes, and snippets.

@asiviero
Created November 7, 2013 01:43
Show Gist options
  • Save asiviero/7347533 to your computer and use it in GitHub Desktop.
Save asiviero/7347533 to your computer and use it in GitHub Desktop.
Open a child window on Alloy/Titanium
$.child_window.open();
<Alloy>
<Window id="child_window">
<Label>This is the Child Window</Label>
</Window>
</Alloy>
$.button.addEventListener('click', function(e) {
child_window = Alloy.createController('child_window');
// Since the controller calls the open() function, nothing
// else is needed here
})
<Alloy>
<Window id="parent_window">
<Button id="button">Open Child Window</Button>
</Window>
</Alloy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment