Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

gmrcosta

Funcionamento CheckBox em função de uma Combo

Recommended Posts

Pessoal, será que alguém poderia me ajudar.

 

Tenho uma lista de palavras que são acionadas por uma Combo. Sendo que cada palavra tem atributos específicos.

 

Porém não estou conseguindo fazer com que os "checkboxes" fiquem "Checked" de acordo com a propriedade deles (0 ou 1) que está na tabela .

 

Segue abaixo o trecho do código.

ASP
<select name="cbonewfun" onchange="java script:form.action='funcionario.asp';document.form.submit();"

            style="font-size: 8pt;      font-family: verdana" style="width='295'" ID="Select1">

             <option value="">-- Nova Marca --</option>

             <%

                do while not rs_fun.eof

                nome_fun = rs_fun("new_fun")          

             %>

              <option value='<%=nome_fun%>'<%if nome_fun=vnewfun then%> selected <%end if%>>

              <%=nome_fun%>

              </option>

             <%  

            rs_fun.MoveNext

                           loop                  

                           Call FechaConexoesBD()

             %>            

         </select>

            </td>

            <td class="formulario" width="5%"><b>Nome:</b></td>

                <td class=formulario width="15%">

                <input class="texto" NAME="nome_fun" TYPE="TEXT" value="<%=vnewfun%>" size="45" maxlength="55" ID="Text12">   

                 <%Call AbreConexoes ("FUNC")

                  Sql="select * from busca_funcionario where usuario = '"&usu&"' and new_mar='"&nome_fun&"'"

                  set rs_fun2 = conn.execute(Sql)

                  terc=rs_fun2("terc")

                 

                 %>

                 <b>Terceiro</b><input type="checkbox" name="terceiro"  <% if terc="0" then %> checked <%end if%> ID="Checkbox3">

 

-----------------------------------------------------------------------------------

Post Mesclado

-----------------------------------------------------------------------------------

 

Ou será que alguém teria algum trecho de código que faz isso que estou tentando fazer ?

 

Valeu

Compartilhar este post


Link para o post
Compartilhar em outros sites

tente assim

 

ASP
<%if ucase(trim(nome_fun))=ucase(trim(vnewfun)) then%>

 

vnewfun tem algum valor?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.