I'm using the latest version of the SDK and yet this doesn't seem to work.
In my results.js file:
var webview = Ti.UI.createWebView({url:'page.htm'}); win.add(webview); Ti.App.addEventListener('getData', function(){ alert('fired'); });In page.htm:
<html> <head> alert('webview loaded'); Ti.App.fireEvent('getData'); </head> <body></body> </html>The first time results.js loads the webview alerts "webview loaded" and then calls the event
getData. However on calling webview.reload() the webview alerts "webview loaded", but the fireEvent doesn't fire/get through.
I've even tried re-setting the Ti.App.addEventListener before reloading the webview.... I don't know what else to do.
Thank you.
1 Answer
Accepted Answer
How about if you reset the (same) url rather than using the reload method?
You could also try adding a random number param to the page.htm?rand=12345 too.
Interested to know how this works out.
btw: iPhone or Android?
Your Answer
Think you can help? Login to answer this question!