
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] How to use BUY ME image buttons in a form on a resultspage?
>The setup:
>-----------
>Red Hat 6.2
>
>Interchange 4.6.5
>
>People are at a results page looking at a form that lists T-shirts.
>There is a different T-shirt on each row, listed along with its price
>and description. There are <SELECT> widgets on the each row, letting the
>user pick size and color.
>
>The problem:
>-----------
>The web designer wants an <input type="image"> button on each row of the
>form. The image shows a "BUY ME!" graphic. It's the same image on each
>row of the table. It has to be in a form because of the size and color
>drop down widgets.
>
>On another page, I just use something like this:
> [loop search=...]
> <tr><td>
> [order [loop_code]]<img src="buyme.gif">[/order]
> </td></tr>
> [/loop]
>
>But that results in <a href> tags and not <input type="image"> buttons.
>
>This approach doesn't seem to work for page in question either:
>
><form name="results" action="[process-order]" method="POST">
><input type="hidden" name="mv_todo" value="refresh">
><input type="hidden" name="mv_nextpage" value="ord/basket">
>[loop search="ra=yes/fi=tshirts/tf=description"]
> <tr><td>
> <input type="image" name="mv_junk" src="buybtn.gif" onClick="
>results.mv_order_item.value='[loop-code]';
>results.mv_order_size.value=results.size_[loop-increment][results.size_[loop-increment].selectedIndex].value;
>results.mv_order_color.value=results.color_[loop-increment][results.color_[loop-increment].selectedIndex].value;
>results.submit();">
> </td>
>
>MORE STUFF (like the code for [loop-accessories] tags for color and size
>
></tr>
>[/loop]
>
>I've been scouring the docs and the archives all day, and can't seem to
>get my head around how to do this?
>
>Anybody?
[page form="mv_order_item=[item-code]
mv_order_quantity=1
mv_todo=refresh"]<img src="/images/orderitnow.gif"
alt="Order It" width=250 height=35 border=0>[/page]
This has worked for me for many years. may have to change [item-code]
to [loop-code] (note you have [loop_code] at the top instead of
[loop-code]
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users