Sandeep Rao Sandeep Rao - 1 year ago 78
Android Question

Is there any way to capture the android 'GO' button or iPhone 'GO' button in jquery?

I am building a mobile website, In this a form is there but no submit button. So when the user types something in the input field and clicks on Android or iPhone GO button it should submit the form. I'm using HTML and jQuery for this.

How can I capture this GO event in jQuery? I want it to be done this way it self.

Answer Source

Add a submit-button and set its opacity to 0.

I used this for html:

    <input type="text" name="input" />
    <input type="submit" style="opacity:0;" />

And this to alert() the value:

$(document).ready(function() {
    $("form").submit(function() {

You just need to handle the submit-Event of the form, this works great with jQuery.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download