|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hello everybody,
I am building a shopping cart for ecommerce purpose. I have two windows, one lists the items can be selected. the other will show the selected items. When the cumtomer click a item for the first time the child window will pop up and show the first selected item. In the child window, there are also three links for "cancel" "Update the quantity" and "confirm". The problem is when say, customer has selected three items, then he canceled one, now, two items are left. Then, when the custome try to add a new item by clicking the hyper link in parent window, the child window again excute the last "cancel" command instead of adding the new item, as if the cumtomer click the refresh button of the child window. Can any help, this problem is driving me crazy! ***the link in parent window is as follows,*** Response.Write "<td>" & "<input type=image src=""/image/ShoppingCart.gif"" onclick=""MyWindow=window.open('shoppingcart.asp?actiontype= Add&BookStoreName=" & rs("BookStoreName") & "&Title=" & rs("Title") & "&quantity=1','cart','scrollbars=yes,height=300,widt h=1024');MyWindow.focus();"">" & "</Td>" *** the code in child window *** (1)-->the link for "Cancel" item in child window Response.Write "<TD><a href=javascript:doSubmit(""Cancel"","""",""" & Session("AArray")(Row,0) & """,""" & Session("AArray")(Row,1) & """)>" & "È¡Ïû</a></td>" (2)-->doSubmit function function doSubmit(op,qt,bi,Tit){ document.form1.BookTitle.value=Tit; document.form1.BookStoreMZ.value=bi; document.form1.ActType.value=op; document.form1.Quantity.value=qt; document.form1.submit(); } (3)--->hidden form <form action="<%=Request.ServerVariables ("SCRIPT_NAME")%>" name="form1" method="get"> <input type=hidden name=BookTitle value=""> <input type=hidden name=BookStoreMZ value=""> <input type=hidden name=ActType value=""> <input type=hidden name=Quantity value=""> </form><div align=center> Thanks, Felix |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > shopping cart |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|