[ic] Any problems with this small hunk of code?

Brian J. Miller brian at endpoint.com
Thu Sep 29 11:40:20 EDT 2005

Spencer Christensen wrote:
> Brian J. Miller wrote:
>> DB wrote:
>>> The following code seems to work ok within a loop on a page I named
>>> items_list.html, the goal being to add a part to the cart and return to
>>> the same page. I'm just wondering if there are any glaring problems with
>>> doing things this way. Any thoughts welcome.
>>>    <form action="[process-target]" method="POST">
>>>    <input type="hidden" name="mv_session_id" value="[data session id]">
>>>    <input type="hidden" name="mv_todo" value="refresh">
>>>    <input type="hidden" name="mv_nextpage" value="ites_list">
>> I am assuming the above should read "items_list" instead of "ites_list"
>> based on the name in your text. An easy way to avoid this issue if you
>> are going to submit back to the same page is to use an IC "built-in"
>> variable.
>> <input type="hidden" name="mv_nextpage" value="@@MV_PAGE@@">
>> Should give you the same thing and is more portable.
> Hello DB,
>   Besides what Brian mentioned, I would say that this method is fine.
> One thing that crosses my mind is your quantities.  Is there a reason
> for hard coding the quantities to 1?  Are you restricting customers from
> ordering more than one of the same item?  If so, then you will need to
> stop them from adding the same item to their cart more than once.  They
>  add it to their cart, the page refreshes, and then they click on the
> item again.  Something to think about.  But if this isn't a problem,
> then don't worry about it.

>From his original code:

    <input type="text" name="mv_order_quantity" value="1" size="3">

The "1" is just the default in an open text box. How was it hard coded?
There isn't even a maxlength not that that means much anyways.

Brian J. Miller
End Point, Corp.

> Spencer Christensen
> Web Engineer
> (801)746-7580  x101
> www.Backcountry.com
> "We use the gear we sell"
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users

More information about the interchange-users mailing list