Hello,

The alert() musn't display, if any checkbox(s) isn't selected.
How can I do this?

PHP Code:
<script language="javascript">
function confirmDel() {
 var agree=confirm("Are you sure you want to delete rows?!");
 if (agree) {
  return true ; }
 else {
  return false ;}
}
</script>

<input type="checkbox" name="name[]" value="<?=$id?>">
<input type="checkbox" name="name[]" value="<?=$id?>">
<input type="checkbox" name="name[]" value="<?=$id?>">
<input type="checkbox" name="name[]" value="<?=$id?>">
<input type="checkbox" name="name[]" value="<?=$id?>">

<input type="submit" onclick="return confirmDel();" />
Thanks in advance