Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

creloaded 6.2 – osCommerce – shopping cart check/uncheck all – remove items from cart

<input type="button" value="CHECK ALL" onclick="checkUncheck(true);" />&nbsp;<input type="button" value="UNCHECK ALL" onclick="checkUncheck(false);" />

function checkUncheck(flag) {
				  for (var i=0;i<document.forms[0].elements.length;i++) {
					var e = document.forms[0].elements[i];
					if ( ( != 'cart_delete') && (e.type=='checkbox') && (!e.disabled) ) {
					  if(flag) document.forms[0].elements[i].checked = true; else document.forms[0].elements[i].checked = false;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: