Quantcast
Channel: Fórum ASP
Viewing all articles
Browse latest Browse all 1214

resgatar valores marcados em checkbox

$
0
0

Pessoal!

 

fiz esta pequena página, mas como poderia pegar os valores do ckeckbox que foram selecionados?

codigo completo:

<!--#include file="conn.asp" -->
<style type="text/css">
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font: 11px Arial, Helvetica, sans-serif;
	text-decoration: none;
}
td {
	text-decoration: none;
	font: bold 11px/2.8em Arial, Helvetica, sans-serif;
	margin: 0px;
	padding: 0px 0px 0px 10px;
	float: left;
	color: #113389;
	border-width: 0px;
	border-style: none;
	background: #E9E9E9;
}
.input {
	font: 11px Arial, Helvetica, sans-serif;
	text-decoration: none;
	margin: 0px;
	padding: 0px;
	background: #113389;
	color: #FFF;
	border: thin solid #1A469F;
	height: 30px;
	width: 100px;
}
select {
	font: 11px Arial, Helvetica, sans-serif;
	text-decoration: none;
	color: #113389;
	background: #FFFFFF;
	width: 220px;
	height: 30px;
	border: thin solid #FFF;
}
img {
	border-width: 0px;
	border-style: none;
	margin: 0px;
	padding: 0px;
}
#estrutura_sistema {
	background: url(_img/img01.png);
	height: 30px;
	position: fixed;
	width: 100%;
	z-index: 999;
	top: 0;
	text-decoration: none;
	font: bold 11px/2.8em Arial, Helvetica, sans-serif;
	margin: 0px;
	padding: 0px 0px 0px 10px;
	float: left;
	color: #FFF;
}
#conteudo{
	width: 100%;
	margin: 0;
	height: auto;
}
#centro {
	width: 100%;
	margin: 30px auto 0px;
	text-align: center;
	float: none;
	height: 50%;
}
.multiselect {
	width: 320px;
	height: 120px;
	border: 1px solid #CCCCCC;
	overflow: auto;
}
.multiselect label {
    display:block;
}
.multiselect-on {
    color:#ffffff;
    background-color:#000099;
}
</style>

<script type="text/javascript">
jQuery.fn.multiselect = function() {
    $(this).each(function() {
        var checkboxes = $(this).find("input:clientes");
        checkboxes.each(function() {
            var checkbox = $(this);
            // Highlight pre-selected checkboxes
            if (checkbox.attr("checked"))
                checkbox.parent().addClass("multiselect-on");
 
            // Highlight checkboxes that the user selects
            checkbox.click(function() {
                if (checkbox.attr("checked"))
                    checkbox.parent().addClass("multiselect-on");
                else
                    checkbox.parent().removeClass("multiselect-on");
            });
        });
    });
};
</script>
<script type="text/javascript">$(function() {$(".multiselect").multiselect();});</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<div id="estrutura_sistema">GABARDO - ENVIO DE E-MAILS POR GRUPO</div>
<div id="conteudo">
	<div id="centro">
	  <form id="frm" name="frm" method="post" action="">
	    <table width="100%" border="0" cellspacing="2" cellpadding="2">
	      <tr>
	        <td width="10%">Selecione os Nomes:</td>
	        <td width="25%">
			   <%
               SET CLIENTES = CX.Execute("SELECT * FROM TB_CLIENTES_ANIVER ORDER BY NOMECLI ASC")
               %>
               <div class="multiselect">
               <% 
			   DO WHILE NOT CLIENTES.EOF 
			   %>
               <label><input type="checkbox" name="option[]" value="<%=CLIENTES("RECNUM")%>" /><%=CLIENTES("NOMECLI")%></label>
               <%
               CLIENTES.MoveNext
                        Loop
               %>
            </div>
            </td>
	        <td width="65%"><label form="select">
	          <input name="button" type="submit" class="input" id="button" value="Enviar Emails" />
	          </label></td>
          </tr>
        </table>
	  </form>
	</div>
</div>

Aguardo um retorno dos amigos.

obrigado.


Viewing all articles
Browse latest Browse all 1214