I am trying to build a string using java but I get an error "item_number is undefined" on Line 43 (in red).
I basically want the script to add "PB" to the end of the output string. I think I need to tell it that "PB" is a text variable?
Any help you could give me would be much appreciated.
I basically want the script to add "PB" to the end of the output string. I think I need to tell it that "PB" is a text variable?
function setDelivery()
{
var descriptions = new Array(4);
descriptions[1]="Extra Shipping Charge: Same Day (Dublin Only)";
descriptions[2]="Extra Shipping Charge: Saturday Delivery (Ireland and Northern Ireland)";
descriptions[3]="Extra Shipping Charge: United Kingdom";
descriptions[4]="Extra Shipping Charge: Saturday Delivery (Dublin Only)";
var costs = new Array(4);
costs[1]=10; costs[2]=10; costs[3]=10; costs[4]=20;
var deliveryOption = getCheckedValue(document.orderForm.elements["delivery"]);
if (deliveryOption > 0)
{
document.addForm.amount.value = costs[deliveryOption];
document.addForm.item_name.value = descriptions[deliveryOption];
document.addForm.item_number.value = item_number + "PB";
if (navigator.appName != "Microsoft Internet Explorer" ||
navigator.appVersion.indexOf('MSIE 6.0') == -1) { document.addForm.target="_new"; }
document.addForm.submit();
} // END if
else { document.viewForm.submit(); }
} // END viewCart
Any help you could give me would be much appreciated.
