Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Japanese IME entry on phones and Javascript form input



TLUG,

I have a site where some form data is collected and sent to the server
using Javascript. Instead of having the user press a "submit" button,
the Javascript watches for changes in the form field, waits three
seconds, and then automatically sends the new data via JSON. (The
timer resets with every user action, so it waits for three seconds
after the user has completely finished any action).

This works fine on my desktop and laptop computers, in English or
Japanese. Note that I'm testing using Ubuntu, with Anthy/IBUS input
for Japanese.

On my Android phone, however (Samsung Galaxy S2, Android 2.3), while
English input works fine, any time I try to enter Japanese characters,
the Javascript seems to send blank data.

It seems that one possibility is that when the user begins typing
Japanese, the Javascript timer gets started. However, while the IME on
the phone is converting kana to kanji and waiting for the user to
finish typing, the Javascript does not see any of this activity taking
place. It thinks the user has not pressed any buttons for a while, so
it fires off the JSON before there is complete input, resulting in a
blank string.

Is that what is happening?

Can I get around this somehow, without having to abandon the timer
input method and put a submit button in its place?

(The reasons I want to go with the timer input are too lengthy to
describe here, but I have thought this through, so please take it as
axiomatic that the timer input is the way to go for this particular
interface.)

-- 
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links