Website with ASP/JavaScript Question

YodaMan

Member
Jun 26, 2002
76
0
0
First of all I must apologize for this confusing description; I tried my best to make it as clear as possible.

I am trying to build a page where the user can request multiple items. Each item an individual purchases has a description that goes along with it.
For example if they want to buy a tennis racket, we need to know the size, color, material etc.
Most of our consumers only buy 1 thing, however we want to give them the ability to be able to purchase up to 5 at a time. Each item needs to have its own description. WEll basically I dont want this page to be REALLY big unless they have more than one thing they want to buy.

I want a page that is similar to this:
Name
address
City

Item requested
Color
Size
Material

CLICK HERE TO PURCHASE ADDITIONAL THINGS

This is a very very short version of the page (just to deter certain folks from saying if its that short, who cares!), anywho when they click on the additional items button, I want the rest of the blank spaces to appear for items 2 through 5.

SO the new page would be
Name
address
City

Item requested
Color
Size
Material

Item requested
Color
Size
Material

Item requested
Color
Size
Material

Item requested
Color
Size
Material
-------------------------------
Now my overall question: How can I do this and still be able to carry over the information from the first page, the name and info for first item without having them write it in again??? Or is there a way where I can just show the first half of the page and the rest can be visible once someone clicks on the button for additional items.

Thanks in advance.
 

AngryKid

Member
May 29, 2003
187
0
0
Well, if you want to display the values from the first page, you can reference them as such:

Name: <%=Request.Form("name")%>

Address: <%=Request.Form("address")%>

etc...

Replace Request.Form with Request.QueryString if you're using a GET instead of POST.

If you then want to save those values so you can pass them to the next form, you'll want to add some hidden fields to the second form, like so:

<input type="hidden" name="address" value="<%=Request.Form("address")%>">
<input type="hidden" name="name" value="<%=Request.Form("name")%>">

These will make the values from the first page available to the next page (page 3).

Is that what you were looking for, or even close?? Cheers...
 

YodaMan

Member
Jun 26, 2002
76
0
0
Hey, that was basically what I was looking for.
A question I still have is now, do I have to include the first file into my second file using #include=xyz.asp?

I am not sure what you meant by this :
"Replace Request.Form with Request.QueryString if you're using a GET instead of POST."

Thanks a lot