Hello...I am a novice at JavaScript and would really appreciate some help. I have been searching for examples throughout the internet and just don't know if I am not knowledgeable enough or I am just making a mistake....
I want to calculate the cost of a shirt based on the size and the quantity of the shirts ordered. I have two drop down boxes where the user is to select the size of the shirt and the quantity of the shirt. Price of the shirt depends on the size (i.e., S-XL - $20.00/shirt; XXL = $22.00/shirt; XXXL = $23.00/shirt) and over all total = Quantity ordered x cost of shirt.
So, this is the javascript that I have been trying to write for the total cost (it may be all wrong as I don't know anything about javascripting):
if (Size_1.0 = "Select") {
Cost_1.0 = 0.00;
}
else if (Size_1.0 = "XXL") {
Cost_1.0 = Qty_1.0 * 22.00;
}
else if (Size_1.0 = "XXXL") {
Cost_1.0 = Qty_1.0 * 23.00;
}
else Cost_1.0 = Qty_1.0 * 20.00;
}
Where Cost_1.0 is a field that shows the overall cost to the user based on the size (Size_1.0 - drop down with the options of S,M,L,XL,XXL,XXXL) and the number of shirts (Qty_1.0 - a drop down field ranging from 1-5).
I know I don't have some of the language correct, so some suggestions would be appreciated. Or, pointing me to where I can learn how to program using the proper format, etc.
Thank you!!!