View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Hi all. I have a working shopping cart that I just found out that it does not work well with Safari. I found the offending code and concluded that, based on the totality of the script, needs to be rewritten.

Currently, the script reads in all the chosen products and the quantity desired. The quantity is just written to the screen and an up arrow and a down arrow allows the user to change the amount. Safari hates this.

I decided to rebuild a script with HTML input boxes but quickly realized that when the update button is pressed that I do not know (cannot tell) which product to update quantity. In the bit picture:

<%
if fequest.formcount("btnchoice") > 0
  **Find which record needs a quantity change
endif
%>
<%
use cart
select * from cart where cartID == custID into cursor cCart
select cCart
lnRecs = reccount()
%>
<FORM NAME="cart" METHOD="post" ACTION="addcart.fwx">
<%for i = 1 to lnRecs%> (found 3 recs for example)
<%GO i%>

  <INPUT TYPE=text NAME="cquant" SIZE=3 MAXLENGTH=3 VALUE="<%=(m.cquant)%>">
<%endif%>
<INPUT TYPE=SUBMIT NAME=btnchoice VALUE="Update">
</form>


So, if the customer updates the second of three quantities then how do I know which quantity to update when the Update button is pressed?

Thanks for your help.