Ok, I found that this can be done with some simple javascript and an "onclick" function. However, I can't figure out how to add the onclick function to this dynamically generated checkbox. I'm using the gift wrapping module. This is the code:
Code:
<?php
// gift wrap setting
echo '<td class="cartWrapCheckDisplay" id="testCheck" onclick="testCheck">';
$prid = $order->products[$i]['id'];
if (zen_get_products_virtual($order->products[$i]['id'])) {
echo GIFT_WRAP_NA;
} else if (DOWNLOAD_ENABLED && product_attributes_downloads_status($order->products[$i]['id'], $order->products[$i]['attributes'])) {
echo GIFT_WRAP_NA;
} else if ($wrap_mod->exclude_product($prid)) {
echo GIFT_WRAP_NA;
} else if ($wrap_mod->exclude_category($prid)) {
echo GIFT_WRAP_NA;
} else {
$gift_id = "wrap_prod_" . $prod_count;
echo zen_draw_checkbox_field($gift_id,'',false, 'id="'.$gift_id .'"');
}
echo "</td>";
?>
How would I add an onclick function to the $gift_id checkbox?
Thanks!
Jurjen