Goedendag allen ik hoop dat iemand mij kan helpen.
Ik ben bezig voor mijn bedrijf met een website waar op je zelf je taart kan samenstellen alleen nu loop ik tegen een probleem aan.
De filling prijs in mijn opzet moet vermenigdvuldigd worden met de geselecteerd aantal personen dit werkt wel zoals ik het nu hier onder heb staan maar hij pakt standaard de 80 personen ook als ik voor 6 personen kies misschien kan iemand mij helpen de om dit aan te passen.
var cake_prices = new Array("", "");
cake_prices["Rond6"]=2.22, cake_prices['aantal']=6;
cake_prices["Rond8"]=2.96, cake_prices['aantal']=8;
cake_prices["Rond10"]=3.70, cake_prices['aantal']=10;
cake_prices["Rond12"]=4.44, cake_prices['aantal']=12;
cake_prices["Rond14"]=5.18, cake_prices['aantal']=14;
cake_prices["Rond16"]=5.92, cake_prices['aantal']=16;
cake_prices["Rond18"]=6.66, cake_prices['aantal']=18;
cake_prices["Rond20"]=7.40, cake_prices['aantal']=20;
cake_prices["Vierkant16"]=5.92, cake_prices['aantal']=16;
cake_prices["Vierkant20"]=7.40, cake_prices['aantal']=20;
cake_prices["Vierkant25"]=9.25, cake_prices['aantal']=25;
cake_prices["Vierkant30"]=11.10, cake_prices['aantal']=30;
cake_prices["Vierkant35"]=12.95, cake_prices['aantal']=35;
cake_prices["Vierkant40"]=14.80, cake_prices['aantal']=40;
cake_prices["Vierkant50"]=18.50, cake_prices['aantal']=50;
cake_prices["Vierkant60"]=22.20, cake_prices['aantal']=60;
cake_prices["Vierkant70"]=25.90, cake_prices['aantal']=70;
cake_prices["Vierkant80"]=29.60, cake_prices['aantal']=80;
//Set up an associative array
//The keys represent the filling type
//The value represents the cost of the filling i.e. Lemon filling is $5,Dobash filling is $9
//We use this this array when the user selects a filling from the form
var filling_prices= new Array();
filling_prices["none"]=0;
filling_prices["slagroom"]=0.29 * cake_prices['aantal'];
filling_prices["geleroom"]=0.29 * cake_prices['aantal'];
filling_prices["chipolata"]=0.40 * cake_prices['aantal'];
filling_prices["mokkacreme"]=0.37 * cake_prices['aantal'];
filling_prices["chocoladecreme"]=0.37 * cake_prices['aantal'];
filling_prices["jam"]=0.29 * cake_prices['aantal'];
Ik ben bezig voor mijn bedrijf met een website waar op je zelf je taart kan samenstellen alleen nu loop ik tegen een probleem aan.
De filling prijs in mijn opzet moet vermenigdvuldigd worden met de geselecteerd aantal personen dit werkt wel zoals ik het nu hier onder heb staan maar hij pakt standaard de 80 personen ook als ik voor 6 personen kies misschien kan iemand mij helpen de om dit aan te passen.
var cake_prices = new Array("", "");
cake_prices["Rond6"]=2.22, cake_prices['aantal']=6;
cake_prices["Rond8"]=2.96, cake_prices['aantal']=8;
cake_prices["Rond10"]=3.70, cake_prices['aantal']=10;
cake_prices["Rond12"]=4.44, cake_prices['aantal']=12;
cake_prices["Rond14"]=5.18, cake_prices['aantal']=14;
cake_prices["Rond16"]=5.92, cake_prices['aantal']=16;
cake_prices["Rond18"]=6.66, cake_prices['aantal']=18;
cake_prices["Rond20"]=7.40, cake_prices['aantal']=20;
cake_prices["Vierkant16"]=5.92, cake_prices['aantal']=16;
cake_prices["Vierkant20"]=7.40, cake_prices['aantal']=20;
cake_prices["Vierkant25"]=9.25, cake_prices['aantal']=25;
cake_prices["Vierkant30"]=11.10, cake_prices['aantal']=30;
cake_prices["Vierkant35"]=12.95, cake_prices['aantal']=35;
cake_prices["Vierkant40"]=14.80, cake_prices['aantal']=40;
cake_prices["Vierkant50"]=18.50, cake_prices['aantal']=50;
cake_prices["Vierkant60"]=22.20, cake_prices['aantal']=60;
cake_prices["Vierkant70"]=25.90, cake_prices['aantal']=70;
cake_prices["Vierkant80"]=29.60, cake_prices['aantal']=80;
//Set up an associative array
//The keys represent the filling type
//The value represents the cost of the filling i.e. Lemon filling is $5,Dobash filling is $9
//We use this this array when the user selects a filling from the form
var filling_prices= new Array();
filling_prices["none"]=0;
filling_prices["slagroom"]=0.29 * cake_prices['aantal'];
filling_prices["geleroom"]=0.29 * cake_prices['aantal'];
filling_prices["chipolata"]=0.40 * cake_prices['aantal'];
filling_prices["mokkacreme"]=0.37 * cake_prices['aantal'];
filling_prices["chocoladecreme"]=0.37 * cake_prices['aantal'];
filling_prices["jam"]=0.29 * cake_prices['aantal'];