fireEvent in webview doesn't work ?
Hi all,
i want to trigger an event when i the user touch a button on a webview.
But it seems the event is not triggered at all.
Maybe there is some mistake on my Javascript onclick ?
or this don't work on iphone simulator ?
sample of my code :
in App.js :
Ti.App.addEventListener('closeInfoWindow', function(e)
{
Titanium.API.info('test from App.js');
infowindow.close();
});
and in my Webview.html
<head>
<script language="JavaScript" type="text/javascript">
function close()
{
Titanium.API.info('test from webview');
Ti.App.fireEvent('closeInfoWindow');
}
</script>
</head>
<body>
<input id="button" type=image onClick="close()" src="mypicture.png">
</body>
seems that even when i click on the input, the OnClick event is not triggered as i don't see the info "test from webview" in the console.
What the hell ? (need jquery file, or .. ?)
1 Answer
-
Change Ti with Titanium
And I'm not sure
Titanium.API.info
is available in webview.