[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Remove checkbox in shopping cart must be before quantity textbox
****** message to minivend-users from Larry Leszczynski <larryl@furph.com> ******
> Very interesting! It might have something to do with the two inputs having
> the same name. Which may be the customer's/your browser freaking out
> (javascript is client-side).
It does have to do with two inputs having the same name, but it's not a
browser-freaking-out thing.
Suppose your basket has only one item in it, so what the browser sees
looks something like this:
Remove: <input type=checkbox name="quantity0" value="0"><br>
Qty: <input type=text size=3 name="quantity0" value="1"><br>
If the checkbox is not selected, the checkbox value does not get sent when
the form is submitted. So the browser only sends "quantity0=1", which
comes from the text input.
If the checkbox is selected, the browser will send the checkbox value, in
addition to text input value. Most browsers send the variables in the
order they appear in the form, so most likely the browser will send
"quantity0=0&quantity0=1". MiniVend is picking up the first value it
finds for the quantity.
> I use an older javascript code: onClick="document.forms[0].submit()" and
> that's it, I'm not sure what your onclick is trying to do...
If your basket.html page has a form tag that looks like:
<form method=POST action="[process-target secure=1]">
then the following page (usually checkout.html) will be displayed using
SSL. But if you submit the form to delete an item, the basket page will
be redisplayed using SSL too.
With this onClick handler:
onClick="this.form.action='[process-target]', this.form.submit()"
you're submitting the form and telling MiniVend to display the next page
without using SSL (i.e. you're resetting the form action from
"[process-target secure=1]" to "[process-target]").
Larry Leszczynski
larryl@furph.com
--
furph, Inc. WWW/Unix/Windows Solutions 734-513-7763 (voice)
info@furph.com http://www.furph.com 734-513-7759 (FAX)
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list