<Input> to Requst.form() puzzle.

This is a discussion on "<Input> to Requst.form() puzzle." within the Classic ASP section. This forum, and the thread "<Input> to Requst.form() puzzle. are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 4th, 2003, 20:40
New Member
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
<Input> to Requst.form() puzzle.

I am need help with a problem that I am having. I am trying to turn 30 pages of code into 2 pages. I am doing good except for 1 small problem. getting information from the <input> on page 1 to the request.form() on page 2.

I am using the following code.

<%WHILE NOT ((recordset1.fields.item("Name").value) = "") %>
<tr>
<td width="20%" height="20">
<td width="5%" Height="20" align="right">
<td width="20%" height="20" align="center">
<input type="Submit" name="<%=(recordset1.fields.item("Rank").value)%>" value="<%=(recordset1.fields.item"Name").value)%">

<td width="1%" height="20">
<%Recordset1.movenext%>
<% If ((recordset1.fields.item("Name").value) <> "") Then %>
<td width="5%" height="20" align="center">
sometext<td width="1%" height="20"><td width="20%" height="20" align="Center" nowrap><%=(recordset1.fields.item("Name").value)%>
<td width="20%" height="20">
<% RecordSet1.movenext %>
<%Else%>
<td width="5%" height="20" align="center" nowrap>sometext<td width="1%" height="20"><td width="20%" height="20" align="Center" nowrap><td width="20%" height="20">
<% RecordSet1.movenext %>
<%end if%>
<%Wend%>

Now, I will try and explain.

This is for a db that has, at present, about 30 tables.
Each table is named with a alpha-numeric name. (ie, 2c3e)
Each table has a "Rank" field.
Each "Rank" field value = the value of a Table name.

I hope this is enough information.

As you see in the above code. I am setting the "name" of the <input> as being the "Rank" value of the current record.

I know the the Request.form() statement calls the "name" value of the <input> statement on the prior page.

What I want to know is:

How do I pass the "name" value of the <input> statement to the request.form() statement when the value unknown??

I hope I have provided enough information for you to provide me with an solution.

Please. Do NOT answer in single line/word replies. I understand alot of about programming. I am just stupid when it comes to the full workings of ASP and VBScript.

Thank you.

  #2 (permalink)  
Old Nov 4th, 2003, 21:55
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
I have to say, I am not totally undersanding what you mean here... It might just be me, so dont worry too much.

Basically, I think you are saying that there are several form fields being submitted and you want to read in ALL of them, but are not sure what each form element has been named?? Is that right?

Please can you clarify before I go on..

Cheers,
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #3 (permalink)  
Old Nov 6th, 2003, 09:27
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
not sure what you mean either, but if you want to loop through the items in Request.Form then do this:

For Each i In Request.Form
Response.Write i & ": " & Request.Form(i)
Next

Does that help?
Closed Thread

Tags
ltinputgt, requstform, puzzle

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding / Showing form fields based on previous form input John Alexander Hopper PHP Forum 1 Mar 10th, 2008 11:30
help with form input gncreditcards Web Page Design 6 Jan 23rd, 2008 01:34
adding a field input to the subject in a form goatsalad PHP Forum 1 Feb 3rd, 2006 14:49
2 similar input validations on one form bldstr JavaScript Forum 3 Jan 30th, 2006 21:27
Anybody know how to change the color of a text input form in Physt Web Page Design 7 Aug 16th, 2004 08:44


All times are GMT. The time now is 23:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43