How can I pass a php page to a selected checkbox list, I have this that shows me the checkboxes, but I'm having trouble sending them to php.
function SelecionaChecks() {
var Check = document.getElementsByName("check");
for (var i=0;i<Check.length;i++){
if (Check[i].checked == true){
// CheckBox Marcado
alert(Check[i].value + " selecionado.");
} else {
// Nenhum checkbox marcado
}
}
}
My checks are coming from this mark:
<div class='row'>
<div class='span12'>
<div class='barra-btn table-bordered'>
<div class='btn-group'>
<button class='btn btn-large' type='button' title='Marcar/Desmarcar todos' id='todos' onclick='marcardesmarcar();'><i class='icon-large icon-ok'></i></button>
<button class='btn btn-large' type='button' title='Imprimir'><i class='icon-large icon-print'></i></button>
<button class='btn btn-large' type='button' title='Enviar mensagem' onclick="SelecionaChecks()" ><i class='icon-large icon-message-plus'></i></button>
<button class='btn btn-large' type='button' title='Adicionar comentário'><i class='icon-large icon-notes'></i></button>
<button class='btn btn-large' type='button' title='Relacionar com uma vaga'><i class='icon-large icon-inbox-plus'></i></button>
</div>
</div>
</div>
</div>
From this loop in this form:
<div class='row'>
<div class='span12'>
<form id="selecao">
<table class='table table-bordered'>
<tbody>
<?php
do {
if ($totalRows_rsRegistro > 0) {
// Resgatando ID´s para gerar pdf e envio de e-mails
$IdCandidato = $row_rsRegistro['id_candidato'];
?>
<tr>
<td width='2%'><input type='checkbox' class='marcar' name='check' id='check' value="<?php echo $IdCandidato; ?>"/></td>
<td width='5%' align='center'>
<div class='btn-group btn-group-vertical'>
<button class='btn btn-small' type='button' title='Imprimir'><i class='icon-large icon-print'></i></button>
<button class='btn btn-small' type='button' title='Enviar mensagem'><i class='icon-large icon-message-plus'></i></button>
<button class='btn btn-small' type='button' title='Adicionar comentário'><i class='icon-large icon-notes'></i></button>
<button class='btn btn-small' type='button' title='Relacionar com uma vaga'><i class='icon-large icon-inbox-plus'></i></button>
</div>
</td>
<td width='70%'><span class='titulo_18 bold'><a href="admin/vercurriculo.php?id=<?php echo $IdCandidato; ?>" class="a-titulo"><?php echo $row_rsRegistro['nome']; ?></a></span></br>
<?php echo $row_rsRegistro['email']; ?></br>
<?php echo $row_rsRegistro['celular']; ?></br>
<?php echo $row_rsRegistro['id_municipio']; ?> | <?php echo $row_rsRegistro['id_uf']; ?></td>
<td width='23%'><span class='titulo_14'>Dados gerais</span>
</td>
</tr>
</tbody>
<?php
} else {
echo "<div align='center'>Não existe(m) curriculo(s) para ser(em) exibido(s)</div></br>";
}
} while ($row_rsRegistro = mysql_fetch_assoc($rsRegistro));
?>
</table>
</form>
</div>
</div>
</div>