Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Fields on form from parameter 1

Status
Not open for further replies.

dpk136

MIS
Jan 15, 2004
335
US
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.

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
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top