This is a discussion on "if else bug and calculate interest funtion help me plz" within the JavaScript Forum section. This forum, and the thread "if else bug and calculate interest funtion help me plz are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
if else bug and calculate interest funtion help me plz
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
if else bug and calculate interest funtion help me plz
Hi guys im trying to work out the interest if the user entered a price and a quantity then depending on what radio button they select it then adds interest onto the total cost.
I tried using if else statements as well and it would only calculate the cost and would not attemp to try the other if statements even though i selected the different radio buttons. There is a few bugs could someone help me out please cash it add 5$ credit adds 1.5 % onto the total cost cheque adds 2 dollars where have i gone wrong thanks For example cost qty 6000 * 1 /100 *1.5 interest how would i add that result onto the running total
|
|
|
|
#2
|
|||
|
|||
|
To start I would change this line
form.total.value = ((price * qty / 100) * 1.5) to form.total.value *= 1.5 / 100 and form.total.value = qty ((qty * price)) + 2; to form.total.value = (qty * price) + 2; Is it picking the right if statement (payment method)? Because boolean checking a radio value won't always work. |
![]() |
| Tags |
| else, bug, calculate, interest, funtion, help, plz |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Article of interest: PHP in the Enterprise (Take 2) | estherschindler | PHP Forum | 2 | Mar 21st, 2008 22:50 |
| Fatal error: call to a member function funtion() on a non-object | timcallagy | Databases | 2 | Mar 4th, 2007 21:55 |
| Calculate item quantity plus shipping | SteveJP | JavaScript Forum | 15 | Oct 3rd, 2006 21:33 |
| VB Code to Calculate Query Results | Imara96 | Databases | 1 | Jun 20th, 2006 22:20 |