views:

38

answers:

1

I am writing an application which needs the user to enter some information into a form and a submit button is provided. However, if the user presses the the "GO/Enter" button on iphone/bb/android and presses the submit button again, I will get an error because each form is associated with an unique ID and can be only submitted once. How do I disable my submit button once the user pressed "GO/enter" ?? thanks.

A: 

I have not looked much into iPhone/Android browsers, so this might be wrong.

I would think that pressing Go/Enter on the iPhone keyboard was like pressing the submit button anyway. So you should be able to get away with something like.

<input type="submit" onclick="this.disabled=true" />
PhilCK
thanks for the reply, when i add that code, and pressed GO on the iphone keypad, it disabled the Submit button, but it did not submit the form it self.how do i disable and submit the form automatically? thanks
Linda
aha! i found it, just usethis.form.submit();thanks!
Linda