Mac Select Working
by pphheerroonn
HTML
<select id="selectYear" onchange="updateMacMenu('selectMac');">
<option>What Year is your Mac?</option>
</select>
<select id="selectMac" style="display:none;" onchange="calculatePrice();">
<option>Select Your Mac</option>
</select>
<select id="selectGrade" style="display:none;" onchange="calculatePrice();">
<option value="0">Is Your Mac functioning correctly?</option>
<option value="1">Yes</option>
<option value="0.5">No</option>
</select>
<div id="macName" style="display:none;"> None Selected </div>
<div id="macPrice" style="display:none;"> € </div>
<script type="text/javascript">// <![CDATA[
/* document.getElementById("stage2").style.display = "block";
document.getElementById("stage1").style.display = "none";
document.getElementById("error").style.display = "none";*/
var options = ["Mid 2012",
"Late 2012",
"Early 2013",
"Mid 2013",
"Late 2013",
"Early 2014",
"Mid 2014",
"Late 2014",
"Early 2015",
"Mid 2015",
"Late 2015",
"Early 2016",
"Late 2016",
"2017",
"Mid 2017",
"2018"];
//var stuff = { myText: 'hello world!' };
//var someString = 'myText';
//alert( stuff[someString] );
var m2013macs = [
["13-inch MacBook Air Core i5 1.3GHz", "256GB", "230"],
["13-inch MacBook Air Core i5 1.3GHz", "128GB", "220"],
["13-inch MacBook Air Core i5 1.3GHz", "256GB", "240"],
["13-inch MacBook Air Core i7 1.7GHz", "128GB", "260"],
["11-inch MacBook Air Core i5 1.3GHz", "128GB", "180"],
["11-inch MacBook Air Core i5 1.3GHz", "256GB", "200"],
["11-inch MacBook Air Core i5 1.3GHz", "128GB", "180"],
["11-inch MacBook Air Core i7 1.7GHz", "128GB", "240"]
];
var myIndex = [m2012macs,
l2012macs,
e2013macs,
m2013macs,
...