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

Martin Abell abellmt at spsp.net
Wed Jan 21 17:28:29 EST 2004

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; 
	<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; 
	<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.

More information about the interchange-users mailing list