Need a creative mind for passing input variables w

Results 1 to 2 of 2

Thread: Need a creative mind for passing input variables w

  1. #1
    Join Date
    Dec 1969

    Default Need a creative mind for passing input variables w

    Imagine this.<BR>Lets say that I have 3 folders representing a roll of 36 exposure film images. I want to create a page from each folder of images that table the images (I basically have this figured out with FSO). But I want to have 3 text input options under each photo (i.e. Fill in the blank for # of 4x6&#039;s desired, Fill in the blank for # of 5x7&#039;s desired,etc). I want a user to be able to select what photos they want, at what size, and quantity. I then want to hold this answer in memory while they go to the next 2 rolls of film (2 more folders of images, and 2 more pages of pictures). While all the text boxes will have zeroes(or null) originally, I only want to pass values greater than zero (or null). <BR><BR>My problem is this: <BR>1) I need to figure out how to identify the photos when I pass the variable. I don&#039;t know the filenames so all I can really do is have something like &#060;input type="text" name="&#060;%=objFileItem.Name%&#062;_4x6"&#062;. But I don&#039;t know how to predict on the next page what the text box&#039;s name is going to be, so I can&#039;t really watch for an unknown variable. <BR>2) I&#039;d like to be able to say: "Hey page, process any forms that were filled out and tell me what picture they went with, what size picture it was for, and how many of those they wanted. And forget about everything else" <BR>3) I really just want to have the following 3 bits of info passed:<BR>"Filename" & "quantity desired" & "of what size photo"<BR><BR>If you have any idea how to go about this (even thinking outside of what I am presenting) then please help.<BR><BR>Much thanks!

  2. #2
    Join Date
    Dec 1969

    Default Sounds easy enough, but... question: By "hold in memory" I assume you mean in Session variable(s)?<BR><BR>Just put a special prefix on each of the field names:<BR><BR>&#060;input type="text" name="PH_&#060;%=objFileItem.Name%&#062;_4x6"&#062 ;<BR><BR>Make sure that no other fields on the page use the same prefix as their starting characters.<BR><BR>Then:<BR><BR>&#060;%<BR>For Each item In Request.Form<BR>&nbsp; &nbsp; If Left(item,3) = "PH_" <BR>&nbsp; &nbsp; &nbsp; &nbsp; qty = Request.Form(item)<BR>&nbsp; &nbsp; &nbsp; &nbsp; If qty="" Then qty=0 Else qty=CINT(qty)<BR>&nbsp; &nbsp; &nbsp; &nbsp; If qty &#060;&#062; 0 Then<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039; process request for reprints!<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp = Split(item,"_")<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; photoName = temp(1)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; photoSize = temp(2)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<BR>&nbsp; &nbsp; &nbsp; &nbsp; End If<BR>&nbsp; &nbsp; End If<BR>Next<BR>...<BR>%&#062;<BR><BR>I can&#039;t take it further than that without knowing more.<BR><BR>For example, are you going to let them go back to page 1 and change the order? (I would hope so!) Now things get a little more complex. But not impossible.<BR><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