Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

JavaScript And ASP

Hi!
I have some form fields in my ASP page and write the values to Access database. Some of my form fields are length, height and depth. I send these values to db when form is submitted. There is no problem until here.
Also I make some simple calculations (for example. calculating the volume) with javascript. the problem starts here. when the user writes floating numbers Access or JS behaves incorrectly.
My PC's and the remote server's regional setttings are set to Turkey so decimal separetor is comma(,) and thousand separetor is dot(.).
A floating number with (',') as decimal signal is not recognized by JS and A floating number with ('.') as decimal signal is not recognized by Access.

What can I do for this problem?

Comments

  • FlakesFlakes Posts: 642Member
    : Hi!
    : I have some form fields in my ASP page and write the values to Access database. Some of my form fields are length, height and depth. I send these values to db when form is submitted. There is no problem until here.
    : Also I make some simple calculations (for example. calculating the volume) with javascript. the problem starts here. when the user writes floating numbers Access or JS behaves incorrectly.
    : My PC's and the remote server's regional setttings are set to Turkey so decimal separetor is comma(,) and thousand separetor is dot(.).
    : A floating number with (',') as decimal signal is not recognized by JS and A floating number with ('.') as decimal signal is not recognized by Access.
    :
    : What can I do for this problem?
    :


    This may not be the right way of doing it,but couldnt you replace the "," in the numbers with "." in javascript and do the calculations?
    After calculation, you could change it back to ",".

Sign In or Register to comment.