pulling values of checkboxes into confirmation popup
Posted: Tue Mar 09, 2010 11:51 pm
I have several checkboxes in a form like this:
what I want to do is onsubmit popup the message about which boxes the person is going to delete like this:
I call the script with this:
However I get an error, it doesn't seem to like my batchdelete[] checkboxes
is there a way I can display the value of each checked box in the confirmation popup?
Code: Select all
<input type=checkbox style="border: 0;" value="'.$row->id.'" name="batchdelete[]" >
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
function confirmation(f){
if (confirm('Are you sure you want to permanently delete these '+furn_tab.batchdelete[].value+' records ??? Click "OK" to submit delete or "CANCEL" to reject the change')) {
f.submit();}
else {
return false }
}
</SCRIPT>
Code: Select all
$sHtml = '<form name="furn_tab" method ="post" action ="xhr-delete-batch.php" onsubmit ="return confirmation(this)">';
However I get an error, it doesn't seem to like my batchdelete[] checkboxes
is there a way I can display the value of each checked box in the confirmation popup?