I can't delete e-cards from table :o
please to confirm is it correct source:
<script language="javascript" type="text/javascript">
<!--
function checkAll(field) {
for (i = 0; i < field.length; i++)
field[i].checked = true;
}
function uncheckAll(field) {
for (i = 0; i < field.length; i++)
field[i].checked = false;
}
var checkobj
function agreesubmit(el) {
checkobj=el
if (document.all||document.getElementById) {
for (i=0;i<checkobj.form.length;i++) { //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}
function defaultagree(el) {
if (!document.all&&!document.getElementById) {
if (window.checkobj&&checkobj.checked)
return true
else {
alert("<?php print $lang_db_ecard_php['ecards_delete_confirm']; ?>")
return false
}
}
}
-->
</script>
and
print '<input type="button" name="CheckAll" class="button" value="'.$lang_db_ecard_php['check_all'].'" onClick="checkAll(document.ecardselect.eidselector)" /> ';
print '<input type="button" name="UnCheckAll" class="button" value="'.$lang_db_ecard_php['uncheck_all'].'" onClick="uncheckAll(document.ecardselect.eidselector)" />';
and
print '<input type="submit" class="button" name="delete" value="'.$lang_db_ecard_php['ecards_delete_selected'].'" disabled /> ';
print '<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)" />'.$lang_db_ecard_php['ecards_delete_sure'];
don't work, why?
maybe something wrong with:
print "<td".$tempClass." align=\"center\"><input type=\"Checkbox\" name=\"eid[]\" value=\"".$line['eid']."\" id=\"eidselector\" class=\"checkbox\" /></td>\n";
couse name=\"eid[]\" is blank string.