Question

I'm using PhoneGap and Sencha Touch to display a form. I'm using an image as the button to submit it:

<img id='submit' src='button.png' />

I'd like to then listen to it be clicked and validate the form. If I try the following it never seems to fire:

Ext.get('submit').on('click', validateFn);

Am I missing something obvious? Should I use <input type="image" ... />?

Update: For future viewers of this question it is worth noting that inconsistent click handling seems to be a bug or series of bugs in Android's WebView. There are several unresolved bugs on this topic.

Was it helpful?

Solution

Yes it do accept click events

Check this link and sample out

http://developer.android.com/resources/articles/using-webviews.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top