I have a form, i want to validate the one field that is entered, it needs to be a number and i need that value for something else on another page. The problem is that i am looping through a ASP recordset and allowing the person to enter one field in a row.
The xxx part is a textbox that they enter the data. The textbox is named check*num*...so if the first row it is check1 and the second row is check2. So i pass this in a parameter when i call the function to check it.
In the following code, i have everything that i need to process this...i just can't figure out how to call this field, it is given into the parameter checki (the first one).
So if i call ConfirmCheck('check2',15,2,'test')
I want it to be able to get the value for check2
Any help would be great.
Thanks
David Kuhn
------------------
Code:
ID | Name | Company | Qty
1 | Joe | ABC | XXXX
2 | bob | Acme | XXXX
The xxx part is a textbox that they enter the data. The textbox is named check*num*...so if the first row it is check1 and the second row is check2. So i pass this in a parameter when i call the function to check it.
In the following code, i have everything that i need to process this...i just can't figure out how to call this field, it is given into the parameter checki (the first one).
So if i call ConfirmCheck('check2',15,2,'test')
I want it to be able to get the value for check2
Code:
function ConfirmCheck(checki,intReportQty,ID,searchfields) {
var checkAmt= document.myForm." + checki + ".value
if (IsNumeric(checkAmt) == true) {
if (confirm("Are you sure you would like to confirm this quantity amount?") == 1) {
window.location="ConsolidationListReport.asp?FreightReportID=" + ID + "&ReportQty=" + intReportID + "&UpdateAmt=" + checkAmt + "&" + searchfields
}
}
}
Any help would be great.
Thanks
David Kuhn
------------------