Working out Percentage

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 9th, 2006, 10:26
Junior Member
Join Date: Dec 2005
Location: Dublin
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
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??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 9th, 2006, 14:14
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jun 10th, 2006, 03:26
Junior Member
Join Date: Dec 2005
Location: Dublin
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Working out Percentage

Did you learn how to give useless information in school
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jun 10th, 2006, 16:29
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Working out Percentage

Quote:
Originally Posted by jwalker80
Did you learn how to give useless information in school
Is this not what you wanted to know then?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
working, percentage

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 09:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42