0

I have a problem with a value not formatted properly in internet explorer. Let me recap quickly the background. I support an end of life app with struts 2 who needs to be run on IExplorer. THe client raised a support request because after the migration to windows10 a field who contains a number doesn't display properly the value even with the compability mode.

I tried to reproduce this error on my machine with but the value is formatted properly.

When I go to the dev tools, this is the generated code from my machine:

<INPUT id=mpMontantHtva class=floatField style="BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: right; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: transparent" readOnly maxLength=12 size=16 value=32.281,46 name=mpMontantHtva>

and this is the same page on the client machine:

<INPUT id=mpMontantHtva class=floatField style="BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none; TEXT-ALIGN: right; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: transparent" readOnly maxLength=12 size=16 value=32,00 name=mpMontantHtva>

As you can see the number to display is not 32.281,46 but 32,00. I did another test with another browser and the value is correct but unfortunetely we can't use another browser due to css compability.

I assume it shoudl be an environement settints on the machine who can affect the display but I can't find where.

Have you an idea?

Thanks, Ersch

Ersch
  • 173
  • 2
  • 15
  • What does the actual HTML _source_ look like? – 04FS Sep 17 '19 at 10:02
  • Try to clear the IE browser data (cache, cookie and history), then retest your code. If still not working, which version of IE browser are you using? You also try to [reset the browser setting](https://support.microsoft.com/en-us/help/17441/windows-internet-explorer-change-reset-settings). – Zhi Lv Sep 17 '19 at 12:16
  • I tried booth cleat the IE browser data and also reset the browser settings. Actually, I have the problem on all the w10 machine at the customer office and not in my office. Impossible to reproduce the prob. I found something in the code, it's a piece of javascript who format the value, I wonder if the prob couldn't be here. – Ersch Sep 17 '19 at 12:59
  • Try to [set the debugger to check the value](https://learn.microsoft.com/zh-cn/previous-versions/windows/internet-explorer/ie-developer/samples/dn255007(v=vs.85)), also can you share the related javascript code? – Zhi Lv Sep 17 '19 at 13:34
  • I found how to reproduce the issue. I found in the action display of struts a method who use the "HttpServletRequest request" and pass the request..getLocale(). If I remove this to pass Locale.ENGLISH) it works. I tried to move my machine to the UK region but it was impossible to reproduce the problem. I wonder where we can change that in IE to be able to use the request.getLocal() – Ersch Sep 17 '19 at 14:55
  • Please check the different environment setting (OS version, language and region, also include the IE version) between the client machine and your machine, you could try to modify it and use the same configuration. Besides, here is [a thread](https://stackoverflow.com/questions/19438769/httpservletrequest-getlocale-returns-os-locale-not-browser-locale) about using session locale, might be you could try to use it. – Zhi Lv Sep 26 '19 at 10:11

0 Answers0