Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #39364 > unrolled thread

Re: Form processing issue

Started by"J.O. Aho" <user@example.net>
First post2021-01-15 22:10 +0100
Last post2021-01-15 22:10 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Form processing issue "J.O. Aho" <user@example.net> - 2021-01-15 22:10 +0100

#39364 — Re: Form processing issue

From"J.O. Aho" <user@example.net>
Date2021-01-15 22:10 +0100
SubjectRe: Form processing issue
Message-ID<i6eelcF29trU1@mid.individual.net>
On 15/01/2021 18.57, The Doctor wrote:
> Got this form doing
> a calculation as follows:

> put the fraction in this case is
> coming out as 52.5.00 when it is suppose to pass
> 52.50 ?

Remove the '+ ".00"', you need to use number_format() in php to get the 
right number of decimals, see 
https://www.php.net/manual/en/function.number-format.php


> Given the above , how do I fix this?

I would suggest a clean rewrite of the whole thing, I would suggest 
node.js, angular, or something similar, just see to make ajax calls to 
fetch the raw data in json format from the backend (php or database).

Do not generate dynamic javascript in php, you will just end up with a 
code that is difficult to maintain and of course your teacher will fail you.


-- 

  //Aho


[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web