[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Button Tag
Quoting Ron Phipps (takedown@cdsnet.net):
> We've been using the button tag for our clickable images. Long story short
> it worked in all of but one case that we are aware of. The case is when you
> are on the basket page and you want to put a 'Continue Shopping' button.
> Since the forms needs to be processed (in case they changed attributes in
> the cart) it needs to go through process.html. However if you allow it go
> through with secure=1 the user will get a warning that they are being
> bounced form process (which is secure) to index (which is not secure). With
> secure=0 this problem is fixed however you create a larger problem which is
> the checkout page being perocessed insecurely. So I dropped using the
> button tag and pulled out the code it generated then made an addition and
> here it is:
>
> <INPUT TYPE=hidden NAME="mv_click_map" VALUE="Continue_shopping">
> <INPUT TYPE=hidden NAME="mv_click_Continue_shopping" VALUE="">
> <A HREF="javascript:void 0" onMouseOver="window.status='Continue shopping'"
> onClick=" basket.action='[process-target secure=0]';
> (basket.mv_click_Continue_shopping.value='Continue shopping') &&
> basket.submit(); return(false);"
> ALT="Continue shopping"><IMG ALT="Continue shopping"
> SRC="/images/other/cont_shopping.gif" border=0 align=top></A>
>
> The piece added is: basket.action='[process-target secure=0]'; which
> changes how the form is processed (non-secure in this case) when continue
> shopping is pushed. It will still process secure when Checkout is pressed.
>
> My question now, does the button tag allow for java commands to be passed as
> arguments? If it doesn't it may be a good addition to be able to specify
> either generic commands or atleast set the form's action. Mike do you think
> this is a good addition to this tag?
Actually, you can, but only as a part of the confirm process.
This is harder than it looks because you need code in the onClick to
make the button tag work.
This is something I do on many tags -- I added an extra parameter which
works for text buttons and allows you to attach arbitrary tags to the
<A HREF...>, meaning you can put in an onFocus=something ( [button
extra="onFocus=do_something()" ...] ) or any arbitrary parameter.
But if you want to do what you seem to want you will have to do
it by hand (or come up with a patch to button yourself, for it is
not obvious to me -- you might look at a "pre_onclick=something" and
post_onclick=something). The good news is you can do it by hand... 8-)
Thanks as always for the suggestion.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>
Experience is what allows you to recognize a mistake the second
time you make it. -- unknown
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users