Hi All,
This has got me for some reason the code below is translating the currency variable to a string and then not getting the actual value from the self named variable...
$("#quantity").change(function() {
var euroPrice = new Array("12.95", "14.95", "18.95", "21.95");
var gbpPrice = new Array("10.95", "11.95", "16.95", "18.95");
var currency = $("#currency option:selected").val();
var currently = $("#quantity option:selected").val();
$("#Price").text( currency[currently]);
$("#amount").attr("value", currency[currently]);
});
Where #currency and #quantity are two select boxes in the HTML that I need the code to evaluate their currently selected values on changes, retrieving the correct value from the correct variable.
Any help greatly received :)
m