开发者

How to listen for iPhone keyboard action/touch (ex, 'GO', 'Search', etc)

To clarify the weird title. I am trying to use figure out if there is a way, either by javascript or some other means, when the user is presented with a standard text keyboard to listen for the keyboards action like 'GO' or 'Search'. This button is in the bottom right corner of the keyboard used in开发者_如何学运维 Safari on the iPhone. This is NOT a Native APP, but rather a web-app.

I am using jQtouch but can tackle any Javascript. I just need to know if an event is fired specific for the browser or what.

Currently the text box taking input looks like this in code:

<input id="FuzzySearch" name="FuzzySearch" type="text" placeholder="<%= GetFuzzyValue() %>" />

Any help would be greatly appreciative, I would think this would be a standard feature from a usability standpoint. Users will end up clicking the button they are used to and for it to do nothing.


I'm not familiar with the jQtouch framework, but normally the GO button submits the form.

So you would have:

<form ... onsubmit="doSomething(); return false;">
 <input id="FuzzySearch" ... />
</form>


I think I found the issue, when using the latest version of jQtouch. There is an option labeled useFastTouch. This is marked as experimental in the code. I set the value to false on initialization and the keyboard is now submitted the form as expected. This will be marked as and issue with jQtouch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜