This is a discussion on "Working out Percentage" within the JavaScript Forum section. This forum, and the thread "Working out Percentage are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Working out Percentage
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Working out Percentage
Hi,
I am going to use javascript to calculate a value depending on what the user selects from a dropdown menu. I have 2 columns in a table and a dropdown menu. The value in the 2nd column is going to be calculated by taking a percentage of the number that is hardcoded in the 1st column. The user will select an option from the drop down e.g. 10% 20% 30% etc... and the value in the 2nd column will be calculated according to the percentage of the value in the 1st column. Anyone know a simple way to do this?? |
|
|
|
|||
|
Re: Working out Percentage
Did you not learn percentages at school?
10% is the same as 0.1, 20% -> 0.2, and so on. Ergo: first column * 0.1 or 0.2, etc., as selected gives answer. |
|
|||
|
Re: Working out Percentage
Did you learn how to give useless information in school
|
|
|||
|
Re: Working out Percentage
Quote:
|
![]() |
| Tags |
| working, percentage |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| displaying information as a percentage? | ziggi | PHP Forum | 5 | Jan 10th, 2008 15:44 |
| PNG - IE not working | Phixon | Web Page Design | 3 | Nov 30th, 2007 13:47 |
| Erratic widths of percentage-based columns in IE | psyche | Web Page Design | 4 | Aug 13th, 2006 09:43 |
| Percentage problems | HOYS | Web Page Design | 7 | Jan 31st, 2006 15:37 |