canadianjameson
02-08-2005, 07:05 PM
for those of you who know me, you'll recognise this.
function refill_Product(objProducer) {
var objProduct = objProducer.form.Product;
var selectedArray = window[objProducer.options[objProducer.selectedIndex].value.replace(/\s/g,'') + "_Array"];
objProduct.options.length = 0;
for (var i=0; i < selectedArray.length; i++) {
objProduct.options[i]=new Option(selectedArray[i], selectedArray[i].replace(/->\s/g, ""));
}
}
i need to modify it to accept an entry with TWO capital letters in it. right now i think it strips them out before sending them to another script to be used to populate a second menu based on the first selection. i think it only looks at the first letter.. however i now have a name that has 2 in it and the script crashes going from:
This:
var Scaletron_Array = new Array("Now please select the desired product","--------------------------->","Silo Weighing - Strain Guages","Silo Weighing - Load Cells","...");
To this:
var ScaleTron_Array = new Array("Now please select the desired product","--------------------------->","Silo Weighing - Strain Guages","Silo Weighing - Load Cells","...");
how do i modify the script to allow the change?
function refill_Product(objProducer) {
var objProduct = objProducer.form.Product;
var selectedArray = window[objProducer.options[objProducer.selectedIndex].value.replace(/\s/g,'') + "_Array"];
objProduct.options.length = 0;
for (var i=0; i < selectedArray.length; i++) {
objProduct.options[i]=new Option(selectedArray[i], selectedArray[i].replace(/->\s/g, ""));
}
}
i need to modify it to accept an entry with TWO capital letters in it. right now i think it strips them out before sending them to another script to be used to populate a second menu based on the first selection. i think it only looks at the first letter.. however i now have a name that has 2 in it and the script crashes going from:
This:
var Scaletron_Array = new Array("Now please select the desired product","--------------------------->","Silo Weighing - Strain Guages","Silo Weighing - Load Cells","...");
To this:
var ScaleTron_Array = new Array("Now please select the desired product","--------------------------->","Silo Weighing - Strain Guages","Silo Weighing - Load Cells","...");
how do i modify the script to allow the change?