Created
April 16, 2015 10:04
-
-
Save rajubd49/32b5d5ba5fc3e624a607 to your computer and use it in GitHub Desktop.
Fire an event from local HTML - Appcelerator Titanium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Titanium.UI.createWindow({ | |
backgroundColor:'#fff' | |
}); | |
var webView = Ti.UI.createWebView({ | |
url:'/localHtml.html', | |
backgroundColor:'transparent' | |
}); | |
win.add(webView); | |
Ti.App.addEventListener("appC", function(e) { | |
var win1 = Titanium.UI.createWindow({ | |
backgroundColor:'green' | |
}); | |
win1.open(); | |
}); | |
win.open(); | |
/* | |
localHtml.html | |
<html> | |
<head> | |
<title>Local HTML</title> | |
<link rel="stylesheet" type="text/css" href="local.css"/> | |
<script src="local.js"></script> | |
</head> | |
<body> | |
<a href="" onclick='Ti.App.fireEvent("appC", {}); return false;'>www.appcelerator.com</a> | |
</body> | |
</html> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment