[Javascript] Opera onKeyPress

Sabrina Leandro saleandro at yahoo.com
Mon Sep 8 07:34:24 CDT 2003


Hi!

I wonder if any of you had this same problem:
I have a function to format a number as currency (it
adds a comma to separate the last to numbers, if I
enter "123" the number field becomes "1,23")

It works allright in Netscape and IExplorer, but in
Opera the result is "32,1"! And this only happens if
the event is OnKeyPress, if I change it to OnBlur, it
works as expected, but that´s not what I want. (I want
that the formatting occurs as the person types the
number, just like on an ATM machine)

I also had a script to format date that did the same
thing in Opera (put the numbers backwards).

Does anyone know a work around for that "bug"?

thanks a lot!
Sabrina

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Javascript mailing list