close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

how to replace remove item tick box with a button

Thread began 12/16/2009 11:50 pm by elyas218928 | Last modified 1/02/2015 3:36 pm by elyas218928 | 2032 views | 14 replies


problem soft

this is how its done if anyone else needs it.

There are two steps to getting this process to work:
1. change the form element for the checkbox to an image, setting the src= to a delete button image on your site and then adding a call to JavaScript client behavior to submit the form when the button is clicked. The code that begins like this:
<input type="checkbox" value="<?php echo $shoeCart->DisplayInfo("ID"); ?>" name="shoeCart_Delete_<?php echo $shoeCart->DisplayIndex; ?>">
Should be changed to look like this:
<input name="shoeCart_Delete_<?php echo $shoeCart->DisplayIndex; ?>" type="image" onClick="MM_callJS('document.shoeCart_Display.submits();')" value="<?php echo $shoeCart->DisplayInfo("ID"); ?>" src="WA_eCart/Images/Modular_delete.gif" border="0">
2. Next you will need to insert a hidden form element that has the exact same value settings as the Update Cart button. I copied the code for the Update Cart button:
<input type="image" name="shoeCart_Update" src="WA_eCart/Images/S3A_UpdateCart.gif" alt="Update Cart">
and pasted it just after the code for the delete button above, then I changed the code to make the element a hidden field instead of an image field:
<input type="hidden" name="shoeCart_Update" src="WA_eCart/Images/S3A_UpdateCart.gif" alt="Update Cart">
then I removed the src= and alt= from the input tag as they were no longer needed:
<input type="hidden" name="shoeCart_Update">
By making the delete button submit the value it passes to the Update Cart function in the include file, the Quantity for the selected ID gets set to 0, effectively deleting it from the cart. The hidden Update Cart element is detected and causes the Update Cart function to run.
The image Modular_delete.gif is one of the standard images that come with WA DataAssist. I've attached the sample page from the BlueSky Footwear site for you to review.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...