Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Conditional Statement

$
0
0

I need help with a conditional javacript statement to calculate the total number of miles travelled in either their Car or Van.

I have a 11 dropdown boxes "Mode1", "Mode2" etc,  in which the user can select either "Car" or "Van" depending on what mode of transport was used.

Next to each of these boxes is a further dopdown box "Miles1", "Miles2" etc, in which the user can select the amount of miles travelled.

I would then like to have 2 further boxes "TotalCarMiles" and "TotalVanMiles", in which the total amount of miles travelled is calculated, depending on what mode of transport was selected in the "Mode1", "Mode2" etc boxes. But I don't know what script to enter here.

 

I appreciate any replies!

Thanks


Viewing all articles
Browse latest Browse all 12130

Trending Articles