Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] big number calculation to small number using javascript
- Date: Mon, 22 Mar 2021 09:49:53 +0000
- From: James Tobin <jamesbtobin@example.com>
- Subject: Re: [tlug] big number calculation to small number using javascript
- References: <CAMyPCTSYgGyjrctN3P67KJ+9F76qRu_DSN7Q=F91Map3Pc3y7w@mail.gmail.com> <aa23efb3-c6e1-c825-2f71-833a501daf1c@dcook.org>
i've removed parseInt from var brand and var investor and this looks like it *may* have solved the problem (var investor was also dropping to a single digit too) On Mon, 22 Mar 2021 at 09:32, Darren Cook <darren@example.com> wrote: > > > I want to take a user's numerical input and do a calculation on it to > > then show to the user on the screen the calculation as a smaller > > number (scientific notation) > > This looks like a question more suitable for StackOverflow. > > The Number.toExponential() function might be useful: > > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential > > I think you are using jquery, embedded in a PHP script? I'd personally > start by trying reproduce the problem with a simpler script, replacing > form inputs with hard-coded values. > > Darren >
- References:
- [tlug] big number calculation to small number using javascript
- From: James Tobin
- Re: [tlug] big number calculation to small number using javascript
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] big number calculation to small number using javascript
- Next by Date: Re: [tlug] big number calculation to small number using javascript
- Previous by thread: Re: [tlug] big number calculation to small number using javascript
- Next by thread: Re: [tlug] big number calculation to small number using javascript
- Index(es):