I have an onClick listener added to an ImageView in index.xml. clicking the ImageView does not fire the function specified in the index.js, however adding the onClick to the containing view does. It's almost as if the containing view is catching the click and not allowing the contained ImageView to receive it. However, I have several of these and others seem to work fine.
index.xml:
<Alloy>
<Window class="container" onOpen="onWIndowLoad">
<View id="wholeView">
<!-- header -->
<View id="appTopMenuHolder">
<ImageView id="appMenuButton" image="/images/menu_icon.png" onClick="askWhy"></ImageView>
<View id="appTitle"></View>
<View id="newIcon"></View>
</View>
<View id="group"> <!-- removed onClick="testViewClick" -->
<ImageView id="porfilePic" image="/images/profile.png" onClick="askWhy"></ImageView> <!-- removed onClick="askWhy" -->
</View>
<!-- scrollable status section -->
<ScrollView id="statusViewHolder" scrollType="vertical">
</ScrollView>
</View>
</Window>
index.js:
function askWhy(e) {
alert("why");
}
any help or a push in the right direction would be greatly appreciated. Thank you, -NP