hi
in my first form i have a drop down menu.on selecting a choice from it i open the popup.in the popup i display the all types of products avaible in the selected category. he can enter the quantity he wants. now i have some 10 choices in the drop down menu. user can select any product and enter the quantity he wants. ultimately what i want is that when he enters the quantity for product1, product5 or product7 in the popup asp page, i want to display that in the main parent form.how can i dispaly that. i dont need to display in textbox or whatever. but i just it to display below the drop down. how can this be possible

here is the code below in the parent form:
<select onchange="openForm(this);" size="1" name="listData">
<option value="">Select a product type</option>
<option value ="1">Product1</option>
<option value ="2">Product2</option>
etc...

and my function is:
<script>
function openForm(select) {
var itm=select.options[select.selectedIndex].value;
var popup;
popup=window.open("http://localhost/proj/formb.asp?itm="+itm,"form2","toolbar=0,width=300,location=0,status=0,menubar=0");

if (popup) {
if (popup.opener != self) { popup.opener = self; }
} else {
alert("This popup got stopped.");
}
}
</script>

my formb.asp==>
<!-- #include file="conn.config" -->
<script>
function submitForm() {
opener.f.T1.value = "item1";
// close this window
self.close();
}
</script>

<%
tmpNumber = 0
prodID=Request.QueryString("itm")
response.write(prodID)
set rs = db.execute("Select name from tProduct where productID= '" & prodID & "' ")


%>
<table>
<%
do while not rs.eof %>
<tr><td><% Response.Write rs("name") %>: </td>
<td><input type="text" name="T" & tmpNumber size="20">
</td></tr>
<%
rs.movenext
tmpNumber = tmpNumber +1
loop
%>

</table>
<font size="1"><a onClick="submitForm();"><img src="images/submit_btn.gif" border=0></a>
</body>
</font>
<% set rs = nothing
%></html>
i hope i make myself clear because i dont have any area allocated per se in the 1st form. how do i know how many product-tyeps he selected ...if say is choices are:
product product type quantity
Camera handycam 1
Desktop win XP 2

and i have 10 product types....so the popup will change based on the product he selects ... how to trap all the values and display

pls suggest.
thanks

Use Request.Form to grab the value from the other page.

popup=window.open("http://localhost/proj/formb.asp?itm=<%Request.Form("ListData")%>,"form2","toolbar=0,width=300,location=0,status=0,menubar=0");

<%
Dim listvalue
listvalue = Trim(Request.Form("ListData"))
If listvalue = "1" Then
Response.Write "Product1"
ElseIf listvalue = "2"
Response.Write "Product2"
ElseIf listvalue = ""
Response.Write "No product selected"
End If
%>

This article has been dead for over six months. Start a new discussion instead.