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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help passing values

Status
Not open for further replies.
Feb 3, 2003
28
US
What I'm trying to do:
pass information from a form to a page that will process the information.
On the form page it pulls up a list of unassigned inventory and displays it along with a check box. You can choose what you want to assign by clicking the check box next to the item and click the sumbit button and it works fine..if you only choose the items on top of the list. If you choose something lower down on the list the processing page errors out.
When I'm builing the list I have it count each time it displays something and give that value to the check box name(example <input type='checkbox' name='E4' value='9'>) E=equipment the 4 is the fourth time that is has displayed an item and the value is the items value in the DB.
Now here is the issue. Say this item above was the only item passed to the processing page. How do I know that only E4=9 is the only thing that was passed? If I try to count up from 1 I will get errors until I get to 4 and then it will process.
 
Some code would be useful too.

rsshetty.
It's always in the details.
 
the example code (<input type='checkbox' name='E4' value='9'>) is some of the actual code used.

My question is how can I tell that E4=9 was passed to the processing page instead of E8=33?
 
Code:
<%
If Request.Form("E4") <> "" then
   myE4 = Request.Form("E4")
Else
   myE4 = "E4 Wasn't Checked"
End If
If Request.Form("E8") <> "" then
   myE8 = Request.form("E8")
Else
   myE8 = "E8 Wasnt' Checked"
End If
Response.Write("The Value of E4 = " & myE4 & "<br>")
Response.Write("The Value of E8 = " & myE8 & "<br>")
%>

If you want to see the value of everything that came over on the post:
Code:
<%
for each objItem in Request.Form()
   response.write(objItem & " = " & request.form(objItem) & "<br>")
Next
%>
 
I think that will help me. I will give it a try and see if I can get it to work. If I get stuck I will post again and maybe see if I can put the application on the web so you can see what I'm talking about.Thanks for the help Veep
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top