944,113 Members | Top Members by Rank

Ad:
Feb 8th, 2005
0

urgent-how to pass multiple values to the parent form

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
aspuser27 is offline Offline
2 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Need help on centering
Next Thread in HTML and CSS Forum Timeline: Quickie on positin:absolute





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC