I tried to do a test of the submit that deletes the scenes only to appear when clicking on the checkboxes, but the same thing happens, it only appears if you select the first one. But if you select the first one and a few more it deletes in the same, but only appeared if the first one was selected ..
<form action="" method="post">
<? foreach($itens as $myrow){ ?>
<a href="pagina.php?ID=<? echo $myrow['ID']; ?>"><? echo $myrow['Title']; ?></a>
<? echo $myrow['GDate']; ?>
?>
<? echo $myrow['Hour']; ?>
<div class="dashed-line"></div>
<input name="selector[]" id="testecb" type="checkbox" value="<?php echo $myrow['ID']; ?>" />
</div>
</div>
<?}?>
<input type="button" id="selectall-game-button" label="check all" value="Selecionar tudo"
><input type="submit" id="delete-game-button" value="Eliminar" />
<?
****************** AQUI ESTA A ACÇÃO QUE DELETA.. **************
}
} ?>
JS:
$('#selectall-game-button').click(function(){
var chk = $(this).click('checked')?true:false;
$('#testecb').attr('checked',chk);
});
Does anyone have any hates why this happens? : ss