-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi there,
I've been searching through the forums in order to know what's exactly happening with once trustworthy doubleboxes, with no success so far. Some people complain about the double box gulling up the dot, but my user experience is quite different. Just try the following in the online demo:
<zk><doublebox id="dbox" /><button label="Show content" onClick='alert( "" + dbox.getValue() )' /><zscript>dbox.setValue( 20.3d);</zscript></zk>
The doublebox initially displays the right value. Adding some digit at the end (in the decimal part) will result in the doublebox complaining about an invalid value. Any attempt to use , as decimal part separator (as mandated by my locale) in order to write a different number will fail. Dots remain simply unheeded of (it's not possible to type them, which makes sense for they're not meant to be the decimal part separator in my locale).
Any idea as to what is happening?
With kind regards
César Varona
Hi Todd,
I can't understand what's going on, I'm suddenly unable to reproduce the issue concerning a wrong value ex being raised upon blur :(
I'll let you know if I manage to experience this behaviour again.
Thanx again for your help
César
César,
Although I didn't try this on the ZK Sandbox, I did run your example on my server switching between both the Hungarian and Spanish locales. I still can't seem to reproduce the issue. Both locales take the comma as the separator and exhibit error messages if I intentionally type in too many of the commas or the wrong number of digits, etc.
One thing to keep in mind for the locales you mention is that you'll probably need to format the number in the displayed message box - otherwise you'll get "20.3" instead of "20,3".
Sorry I couldn't be of more help.
Todd
Hi Twiegand,
I'm trying the online zk sandbox; I use the code included in the initial post and try the following:
1) From Firefox 3.6.9 with hungarian locale:
1a) Setting the focus on the doublebox and pressing tab results in a wrong value warning red box being raised ("Legyen szíves beírni egy számot és nem 20,3")
1b) Attempts to type a dot fail (it's not possible to type it, for to the best of my knowledge it's not a valid decimal separator in the target locale)
1c) Attempts to type any number containing a , as decimal separator amount to 1a
2) From Internet Explorer 8 with spanish (ES-es) locale:
2a) Same as 1a
2b) A single dot has the same effect as a single , (it is accepted without any complaint as a valid decimal separator and rather surprisingly transformed into a , which as far as I know is the decimal separator in es-ES locale)
2c) Attempts to type any number containing a , as decimal separator amount to 1c
Thanks for interesting about this
César Varona
Hi Murasakiwu,
I'm afraid I can't get the point of all this. My browser has its own locale as default locale, needless to say. That's not the problem I'm talking about. I'm talking about the fact that, for instance, should you try the example above you will notice it suffices to set the focus on the doublebox and press tab in order to make it raise a wrong value exception. Things like this are very strange.
With kind regards
César Varona
Dear César:
Please check the language settings of browser, set it be default with your locale language.
Regards
Asked: 2010-09-21 07:59:59 +0800
Seen: 352 times
Last updated: Nov 08 '10