Mailing List Archive


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

[tlug] [Javascript] enabling/disabling buttons: Japanese text and enter buttons



TLUG,

I have a button on a page that is enabled whenever a text box in an HTML
form is changed.

As the user types, I run some checks on the text, and if the text is
good, the button is enabled. If the text is bad, the button is disabled.
Pretty standard stuff.

The function to call the check is executed by onKeyup() and onChange()
functions attached to the text box. For the most part, it works fine.

However, I've discovered two exceptions.

1.
When entering Japanese text (I'm testing on Ubuntu/Firefox with
Anthy/UIM input), no amount of typing activates the button. If I switch
back to English, type in at least one character, then it will check and
validate the Japanese text. It seems as though Japanese input does not
trigger onKeyup() or onChange() events.

Anyone have experience with this kind of thing?

2.
When the button is disabled, if I press "enter" on the keyboard, the
button's "onclick" action gets triggered. That shouldn't happen, should it?


I'm hoping these are just little things I'm missing.

Can anyone set me straight?

-- 
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links