[ic] Using an image for Remove checkbox (Joshua Lavin)

Joshua Lavin joshua at kingdomdesign.com
Thu Jan 22 07:40:12 EST 2004


On Jan 21, 2004, at 4:28 PM, Martin Abell wrote:

> Josh said (Tue, 20 Jan 2004 12:47:19) :
>
>> I'd like to replace the "Remove" checkbox on the shopping cart with an
>> image. Just changing the input type to image and adding a source broke
>> it.
>
> I've used javascript for increasing, decreasing, and removing items 
> (Interchange 4.8.1) from the cart (didn't implement on checkout page) 
> as in the following 3 lines.
>
> 	<input type="image" src="adj_up.gif" border="0" 
> name="u[quantity-name]" onClick="var currQty = 
> document.basket.[quantity-name].value; currQty=parseInt(currQty,10); 
> currQty = currQty+1; document.basket.[quantity-name].value = currQty; 
> document.basket.submit()">&nbsp;
> 	<input type="image" src="adj_down.gif" border="0" 
> name="d[quantity-name]" onClick="var currQty = 
> basket.[quantity-name].value; currQty=parseInt(currQty,10); currQty = 
> currQty-1; basket.[quantity-name].value = currQty; 
> document.basket.submit()">&nbsp;
> 	<input type="image" src="adj_remove.gif" border="0" 
> name="r[quantity-name]" onClick="var currQty = currQty = 0; 
> basket.[quantity-name].value = currQty; document.basket.submit()">
>
> Of course, the form for the shopping basket has to be named "basket".  
> Hmmm.. the last one appears to have an editing mistake: "currQty = 
> currQty = 0".  Redundant or not, it works, so I'm not changing it!
>
> Martin Abell.
> SpeedSpan.

That worked! Thanks, Martin!

--
Josh Lavin
Kingdom Design   http://www.kdw.us/



More information about the interchange-users mailing list