[go: up one dir, main page]

Menu

#37 javascript probleme floating point in french

open
nobody
None
7
2010-01-12
2009-04-24
Helfima
No

hello
on the xprocess web server, the javascript check the flating value for a task but in french localization there is a problem
in english, a floating point is xxx.xx
in french, it is xxx,xx

i have change the regex value to check

SEARCH in js file
var anum=/(^\d+$)|(^\d+\.\d+$)|(^\d+\.+$)|(^\.+\d+$)/;
REPLACE by
var anum=/(^\d+$)|(^\d+[.,]\d+$)|(^\d+[.,]+$)|(^[.,]+\d+$)/;

Discussion

  • Andy Carmichael

    Andy Carmichael - 2009-05-07
    • priority: 5 --> 7
     
  • Andy Carmichael

    Andy Carmichael - 2009-05-07

    Thanks for reporting this. We'll investigate.

     
  • Andy Carmichael

    Andy Carmichael - 2009-05-07
    • assigned_to: nobody --> t_shelley
     
  • Tim Shelley

    Tim Shelley - 2009-06-29
    • status: open --> closed
     
  • Tim Shelley

    Tim Shelley - 2009-06-29

    I've made the changes in all the Javascripts were we used it. The problem is that now in the UK if I enter 1,2 it will allow it but on save it throws a numberformatexception stack-trace to the browser.

    A better solution is to somehow ask something for the decimal character in the current locale in the Javascript. This would be the ideal solution. I'm not sure if this can be done.

     
  • Tim Shelley

    Tim Shelley - 2009-06-29

    Fixed in v3.2

     
  • Tim Shelley

    Tim Shelley - 2009-06-29

    Needs to be tested on different locales...

     
  • Tim Shelley

    Tim Shelley - 2009-07-01

    Reopened - on further reflection a better implementation needs to be looked into - how in Javascript can be get the decimal place locale character?

     
  • Tim Shelley

    Tim Shelley - 2009-07-01
    • status: closed --> open
     
  • Tim Shelley

    Tim Shelley - 2010-01-12
    • assigned_to: t_shelley --> nobody
     

Log in to post a comment.