I have a <form> with two input objects: a field and a button.
When the form is submitte a javascript:function() is executed and
the same document's DOM is modified via JavaScript's appendChild().
- If the user manually pushes the "OK" button the keyboard goes away
correctly.
- If the user types a return on the keyboard, the form is submitted,
but the keyboard sticks around and isn't dismissed.
The form/javascript does _not_ forward the user to another page or
load any data from a server. It merely modifies the DOM in-place.
How do I get the keyboard to go away after the user submits the form
with the keyboard? I've tried to "blur()" the input field to remove
it from focus, but this did not work.
Thanks,
Sanford
Regards,
Christian Decker
--
http://snyke.net/blog
If your input field's name contains "phone", it'll give you a typical numeric
keypad, if the input field's name contains "zip" it'll start with the regular
keyboard in numeric mode.
http://www.iphonewebdev.com/faq.shtml
Hope that helps,
Erwin.
My dream is an implementation of Web Forms 2.0, which allows the
developer to be more specific about input type...including date and
time fields that could (hint, hint) bring up the kind of control we
get when setting an appointment in the Calendar app.
BJ Clark
bjc...@scidept.com
On Sep 10, 12:06 pm, sanford <shselzn...@gmail.com> wrote:
> Hello,
>
> I have a <form> with two input objects: a field and a button.
>
> When the form is submitte a javascript:function() is executed and
> the same document's DOM is modified via JavaScript's appendChild().
>
> - If the user manually pushes the "OK" button thekeyboardgoes away
> correctly.
>
> - If the user types a return on thekeyboard, the form is submitted,
> but thekeyboardsticks around and isn't dismissed.
>
> The form/javascript does _not_ forward the user to another page or
> load any data from a server. It merely modifies the DOM in-place.
>
> How do I get thekeyboardto go away after the user submits the form
> with thekeyboard? I've tried to "blur()" the input field to remove
-=Randy
I have not tried this, but your " javascript:function() " caught my
eye.
Do you really use that kind of function call, and if so, where?
Please post your simple form.
Javascript: has a special meaning... it is supposed to return HTML
code. Many misuse this of course, but the browser will often do
totally unexpected things because it's in a different mode (expecting
to see new HTML returned from the javascript: call) than in a form
submit.
Always let a form submit call a function and then cancel the submit
yourself in the usual ways.
Best,
Sanford
Best,
Sanford
At 5:09 AM +0000 9/19/07, Chris wrote: