i have a datagrid that i made in ASP, in each row there is a dropdown to change one of the fields, i have named it ShipMethod'i', where 'i' is the line number so the first one would be ShipMethod1. When i click on a link in that row, it passes the name ShipMethod1 and the FreightID. For some reason, it says that ShipMethod1 is undefined.
HEre is my code
getting passed in is
ShipDropDown = ShipMethod1
FreightReportID = 2809
David Kuhn
------------------
HEre is my code
getting passed in is
ShipDropDown = ShipMethod1
FreightReportID = 2809
Code:
function ConfirmShipMeth(ShipDropDown,FreightReportID) {
var ShipMethod= document.forms['myForm'].elements[ShipDropDown].options[document.forms['myForm'].elements[ShipDropDown].selectedIndex].value;
if (ShipMethod !== "") {
if (confirm("Are you sure you would like to confirm this Shipment Method?") == 1) {
window.location="ConfirmShipMeth.asp?ShipMethod=" + ShipMethod + "&FreightReportID=" + FreightReportID;
}
}
}
David Kuhn
------------------