Index of Submit Button

Results 1 to 2 of 2

Thread: Index of Submit Button

  1. #1
    Join Date
    Dec 1969

    Default Index of Submit Button

    I am trying to retrieve records in a table and display them by using a while loop. I also have a dynamically created command button, which when clicked triggers another page. I am using hidden variables to pass the value from this page to the next page like<BR><BR> &#060;input type = "hidden" name="codeid(&#060;%=i%&#062;)" value="&#060;%=rs("code")%&#062;"&#062;<BR> &#060;input type = "hidden" name="valueid(&#060;%=i%&#062;)" value="&#060;%=rs("price")%&#062;"&#062;<BR><BR>In the next page I want to retrieve the above values based on the index of the clicked button. <BR><BR> Like <BR> code2 = request.form("codeid(i)")<BR> value2 = request.form("valueid(i)")<BR><BR>I am not able to pass the index value, i to the next form. I have tried using Session variable. But the index variable displays the value as the heighest value, rather than the clicked button&#039s index value. i.e. i value becomes 14 (As there are 14 records in tha table) rather than the index of the clicked button.<BR><BR>Can any one help me to solve this problem.<BR>

  2. #2
    Mark Guest

    Default RE: Index of Submit Button

    In your second page try:<BR><BR>i = 12343 &#039set variable i to value identified in first page<BR>code2 = request.form("codeid(" & i & ")")<BR>value2 = request.form("valueid(" & i & ")")<BR><BR>Of course, you will have to identify the value of the variable i.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts