fireEvent from remote URL on iphone
Is it no longer possible for remote URLs (ie: myserver.com/myfile.html) to trigger fireEvents in iPhone?
What I am doing is this:
<a href="#" onclick="alert(1);Ti.App.fireEvent('testEvent');alert(2)">Meh</a>
From the remote webview it triggers the first alert but not the second, locally it works fine. Is this an iPhone limitation?
2 Answers
-
To get around remoteURL issue like this, i used a temp webview to hold the html content and create another webview, assign that content to the new webview.
var tempweb = Ti.UI.createWebView({url:'remoteurl.html'}); storeweb.hide(); win.add(storeweb); storeweb.addEventListener('load',function(e){ var temphtml = e.source.html; var winweb = Ti.UI.createWebView({ width:'100%', height:'100%' }); winweb.html = temphtml; })
-
we have write the code in html5 then access the link on titanium web view then we have able to access the camera in iPhone not Android…Any one please help me