I have a form which calculates a dynamic quote on the fly depending on options, and one of these options is two drop downs like this:
<h2>Need a venue?</h2>
<p>Avoid the red tape and book a marquee</p>
<p>What package would you like to order?</p>
<select id="marquee_package" name="marquee_package" onchange="calculateTotal()">
<option value="Bronze">Bronze</option>
<option value="Silver">Silver</option>
<option value="Gold">Gold</option>
</select>
<p>How many people will be attending?</p>
<select id="guests" name="guests" onchange="calculateTotal()">
<option value="0">0</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="150">150</option>
<option value="200">200</option>
<option value="250">250</option>
</select>
In the javascript I have a calculate total function which runs other functions and adds together a returned value from the function.
The function for the Marquee section is below
function calculateMarquee(){
var theForm = document.forms["cakeform"];
var guests = theForm.elements["guests"].value;
var marqueePackage = theForm.elements["marquee_package"].value;
var marqueePrice = 0;
if (marqueePackage = "Bronze"){
if (guests = 0){
marqueePrice = 0;
}
if (guests = 50){
marqueePrice = 650;
}
if (guests = 100){
marqueePrice = 950;
}
if (guests = 150){
marqueePrice = 1400;
}
if (guests = 200){
marqueePrice = 1850;
}
if (guests = 250){
marqueePrice = 2400;
}
} else if (marqueePackage = "Silver"){
if (guests = 0){
marqueePrice = 0;
}
if (guests = 50){
marqueePrice = 1100;
}
if (guests = 100){
marqueePrice = 2150;
}
if (guests = 150){
marqueePrice = 2550;
}
if (guests = 200){
marqueePrice = 4100;
}
if (guests = 250){
marqueePrice = 5100;
}
} else { //gold
if (guests = 0){
marqueePrice = 0;
}
if (guests = 50){
marqueePrice = 1900;
}
if (guests = 100){
marqueePrice = 2800;
}
if (guests = 150){
marqueePrice = 3200;
}
if (guests = 200){
marqueePrice = 4750;
}
if (guests = 250){
marqueePrice = 5750;
}
}
return marqueePrice;
}
The problem is.... right now this function just returns the price of 2400 and will not change at all and I don't know why?