| | |
urgent-how to pass multiple values to the parent form
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Solved Threads: 0
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
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
- How to pass multiple values in table to another form (JavaScript / DHTML / AJAX)
- C# component calling function in Parent form (C#)
- Getting Multiple Values From A Select (ASP)
- urgent-how to pass multiple values to the parent form (ASP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Need help on centering
- Next Thread: Quickie on positin:absolute
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





