JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old May 19th, 2004, 10:49 AM
YOng Chen YOng Chen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 YOng Chen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation shopping cart

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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > shopping cart


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway