Ir para conteúdo

POWERED BY:

Arquivado

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

Getulio Do Carmo

Dificuldade em criar comando

Recommended Posts

Estou criando um questionario academico e tenho algumas dificuladades.

O questionario tem varias questões sendo que algumas dela, te a opção de quando eu clicar bootom de radio sim ele abre uma sequencia de perguntas e no radio não ele pode recolher ou nao fazer nada

tenho a condição mais so consigo colocar ele para uma pergunta, mais preciso para pelo menos umas 5 questões...

Uma da questõe segue abaixo

 

17.</font><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Arial">  
</span><font face="Arial">Você utiliza o laboratório de informática?  

</font> </i></b><font face="Arial"> </font> <!--[if gte mso 9]> 
<![endif]--><font face="Arial"> <input type="radio" name="laboratoriodeinformatica" value="Sim" />SIM <input type="radio" name="laboratoriodeinformatica" value="Não" />NÃO</font></p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
<font face="Arial"> 
<span style="color: red">Se o professor responder não a questão acima, as 
questões sobre esse tema não aparecerão para ele.</span></font></p> 
<p class="MsoListParagraphCxSpLast" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt"> 
<font face="Arial"> 
<b><i>CLASSIFIQUE NUMA ESCALA DE 1 (RUIM) A 5 (EXCELENTE) AOS SEGUINTES ITENS:</i></b></font></p> 
<p class="MsoListPa1ragraphCxSpFirst" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; text-indent: -18.0pt; line-height: normal; margin-bottom: .0001pt"> 
<b><i><font face="Arial">18.</font><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Arial">  
</span></i></b><font face="Arial"><i>Atendimento dos monitores.</i>  
1<input type="radio" name="monitoresa" value="1" style="font-weight: 700" /> 2<input type="radio" name="monitoresa" value="2" style="font-weight: 700" /> 3<input type="radio" name="monitoresa" value="3" style="font-weight: 700" /> 4<input type="radio" name="monitoresa" value="4" style="font-weight: 700" /> 5<input type="radio" name="monitoresa" value="5" style="font-weight: 700" /> 
</font> </p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; text-indent: -18.0pt; line-height: normal; margin-bottom: .0001pt"> 
<b><i><font face="Arial">19.</font><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Arial">  
</span><font face="Arial">Espaço físico.</font></i></b><font face="Arial">  

1<input type="radio" name="efisico" value="1" style="font-weight: 700" /> 2<input type="radio" name="efisico" value="2" style="font-weight: 700" /> 3<input type="radio" name="efisico" value="3" style="font-weight: 700" /> 4<input type="radio" name="efisico" value="4" style="font-weight: 700" /> 5<input type="radio" name="efisico" value="5" style="font-weight: 700" /> 
</font> </p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; text-indent: -18.0pt; line-height: normal; margin-bottom: .0001pt"> 
<b><i><font face="Arial">20.</font><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Arial">  
</span><font face="Arial">Qualidade dos equipamentos.</font></i></b><font face="Arial">  
1<input type="radio" name="qequipamentos" value="1" style="font-weight: 700" /> 2<input type="radio" name="qequipamento" value="2" style="font-weight: 700" /> 3<input type="radio" name="qequipamento" value="3" style="font-weight: 700" /> 4<input type="radio" name="qequipamento" value="4" style="font-weight: 700" /> 5<input type="radio" name="qequipamento" value="5" style="font-weight: 700" /> 
</font> </p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> 
</p> 
<p class="MsoListParagraphCxSpMiddle" style="text-align: justify; text-indent: -18.0pt; line-height: normal; margin-bottom: .0001pt"> 
<b><i><font face="Arial">21.</font><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7.0pt; font-family: Arial">  
</span><font face="Arial">Quantidade de máquinas por aluno.</font></i></b><font face="Arial">  
1<input type="radio" name="quantidadem" value="1" style="font-weight: 700" /> 2<input type="radio" name="quantidadem" value="2" style="font-weight: 700" /> 3<input type="radio" name="quantidadem" value="3" style="font-weight: 700" /> 4<input type="radio" name="quantidadem" value="4" style="font-weight: 700" /> 5<input type="radio" name="quantidadem" value="5" style="font-weight: 700" />

 

O codigo que estou usando para a condição e

 

 

</HEAD> <script> 
function mostrar(valor){ 
if(valor == 1){ 
document.getElementById('nao_contribuinte').style.display="none"; 
document.getElementById('sim_contribuinte').style.display="block"; 
}else if(valor == 2){ 
document.getElementById('sim_contribuinte').style.display="none"; 
document.getElementById('nao_contribuinte').style.display="block"; 
} 
} 
</script> 
       </p> 
       <p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt"> 
<input name="contribuir" type="radio" style="border:0px " value="sim" onclick="mostrar(1)"> Sim 
<input name="contribuir" type="radio" value="não" style="border:0px" onclick="mostrar(2)"> Não 
<label id="sim_contribuinte" for="simcontribuinte" style="display: none"> 
1.<span style="font:7.0pt "Times New Roman"">    </span> 
Considerando-se apenas as aulas teóricas, qual o número aproximado de estudantes 
por turma?</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt"> 
<input type="radio" name="aulasteorica" value="Até 30" />Até 30.</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt"> 
<input type="radio" name="aulasteorica" value="Entre 31 e 50" />Entre 31 e 50.</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt"> 
<input type="radio" name="aulasteorica" value="Entre 51 e 70" />Entre 51 e 70.</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt"> 
<input type="radio" name="aulasteorica" value="Entre 71 e 100" />Entre 71 e 100.</p> 
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt"> 
<input type="radio" name="aulasteorica" value="Mais de 100" />Mais de 100. 
</label>
<label id="nao_contribuinte" for="naocontribuinte" style="display: none"></label>
<BODY>
<?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Veja se é isso...

 

<script> 
function mostrar(valor){ 
   if(valor == 1) {
       document.getElementById('nao_contribuinte').style.display="none"; 
       document.getElementById('sim_contribuinte').style.display="block"; 
   } else if(valor == 2) { 
       document.getElementById('sim_contribuinte').style.display="none"; 
       document.getElementById('nao_contribuinte').style.display="block"; 
   } 
} 
</script>

<input name="contribuir" type="radio" value="sim" onclick="mostrar(1)"> Sim 
<input name="contribuir" type="radio" value="não" onclick="mostrar(2)"> Não 

<div id="sim_contribuinte" style="display: none">
   <br />
   1. Considerando-se apenas as aulas teóricas, qual o número aproximado de estudantes por turma? 
   <p><input type="radio" name="aulasteorica" value="Até 30" />Até 30.</p> 
   <p><input type="radio" name="aulasteorica" value="Entre 31 e 50" />Entre 31 e 50.</p> 
   <p><input type="radio" name="aulasteorica" value="Entre 51 e 70" />Entre 51 e 70.</p> 
   <p><input type="radio" name="aulasteorica" value="Entre 71 e 100" />Entre 71 e 100.</p> 
   <p><input type="radio" name="aulasteorica" value="Mais de 100" />Mais de 100.</p>
</div>

<div id="nao_contribuinte" style="display: none">
  <br />
  Não contribuinte
</div>

 

:thumbsup:

Compartilhar este post


Link para o post
Compartilhar em outros sites

cara tente explicar melhor e mostre como tentou, você por acaso testou em separado o exemplo que te passei? primeiro me responda se não era aquilo, depois vamos tratar esse "conflito".

 

:thumbsup:

Compartilhar este post


Link para o post
Compartilhar em outros sites

Amigo o negocio e o seguinte o questionaria esta em uma pagina so e contem umas 30 questões, e algumas questoes tenho que fazer esse procedimento, as questões ficara retida e aparecera so se a pessoa responder sim

estou a sua dispocição, o conflito esta acontecento quando tem duas perguntas com o mesmo comando elas nao funcionando,

 

Veja ai o codigo rodando e ver o conflito que te falei

 

 

<TITLE>New Document</TITLE> 
<HTML>

<HEAD>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Sim  Não Conteúdo do sim</title>
</head>
<script>
function mostrar(valor){
  if(valor == 1){
   document.getElementByclass('nao_contribuinte').style.display="none";
   document.getElementByclass('sim_contribuinte').style.display="block";
}else if(valor == 2){
   document.getElementByclass('sim_contribuinte').style.display="none";
   document.getElementByclass('nao_contribuinte').style.display="block";
}
}
</script>

<input name="contribuir" type="radio" style="border:0px " value="sim" onclick="mostrar(1)"> Sim 
       <input name="contribuir" type="radio" value="não" style="border:0px" onclick="mostrar(2)"> Não

<table>
<tr>
<td>
<label class="sim_contribuinte" for="simcontribuinte" style="display: none">
<table>
<tr>
<td>1.<span style="font:7.0pt "Times New Roman"">    </span>
Considerando-se apenas as aulas teóricas, qual o número aproximado de estudantes
por turma?</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Até 30" />Até 30.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 31 e 50" />Entre 31 e 50.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 51 e 70" />Entre 51 e 70.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 71 e 100" />Entre 71 e 100.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Mais de 100" />Mais de 100.</td>
</tr>
</table>
</label>
</td>
</tr>
</table>



<label class="nao_contribuinte" for="naocontribuinte" style="display: none"></label>
<body>
<p class="MsoListParagraphCxSpLast" style="text-align: justify; text-indent: 0cm; line-height: normal; text-autospace: none; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">
</p>
<p class="MsoListParagraphCxSpFirst" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">
<b><i> </i></b></p>
<p class="MsoListParagraphCxSpLast" style="text-align: justify; text-indent: 0cm; line-height: normal; text-autospace: none; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">
2.<span style="font:7.0pt "Times New Roman"">    </span>Como são as
instalações físicas (salas de aula, laboratórios, ambientes de trabalho/estudo)
utilizadas no seu curso?</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="istalaçõesfisicas" value="Amplas, arejadas, bem iluminadas e com mobiliário adequado" />Amplas, arejadas, bem iluminadas e com mobiliário adequado.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="istalaçõesfisicas" value="Arejada, bem iluminadas e com mobiliário satisfatório, embora em relação numerode estudantes" />Arejadas, bem iluminadas e com mobiliário satisfatório, embora pequenas em
relação ao número de estudantes.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="istalaçõesfisicas" value="Bem iluminadas e com mobiliário satisfatório, embora sejam mal ventiladas e pequenas em relação ao números de estudantes" />Bem iluminadas e com mobiliário satisfatório, embora sejam mal ventiladas e
pequenas em relação ao número de estudantes.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="istalaçõesfisicas" value="Mal ventiladas, mal iluminadas, pequenas em relação ao número de estudantes e com o mobiliário razoavelmente satisfatório" />Mal ventiladas, mal iluminadas, pequenas em relação ao número de estudantes e
com mobiliário razoavelmente satisfatório.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="istalaçõesfisicas" value="Mal arejadas, mal iluminadas com mobiliário inadequado e pequenas em ralação ao número de estudantes" />Mal arejadas, mal iluminadas, com mobiliário inadequado e pequenas em relação ao
número de estudantes.</p>
<p class="MsoListParagraphCxSpFirst" style="text-align: justify; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">
 </p>
<p class="MsoListParagraphCxSpLast" style="text-align: justify; text-indent: 0cm; line-height: normal; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt">
3.<span style="font:7.0pt "Times New Roman"">    </span>Você utiliza a
rede sem fio para acessar a internet da sala de aula?<b><i>  </i></b></p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt">
<input type="radio" name="redesemfio" value="Nunca, não consigo acesso" />Nunca, não consigo acesso.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt">
<input type="radio" name="redesemfio" value="Nunca, não é necessário utilizar esse recurso nas aulas" />Nunca, não é necessário utilizar esse recurso nas aulas.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt">
<input type="radio" name="redesemfio" value="Acesso quando preciso" />Acesso quando preciso

</HEAD> <script>
function mostrar(valor){
if(valor == 1){
document.getElementById('nao_contribuinte').style.display="none";
document.getElementById('sim_contribuinte').style.display="block";
}else if(valor == 2){
document.getElementById('sim_contribuinte').style.display="none";
document.getElementById('nao_contribuinte').style.display="block";
}
}
</script>
</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; margin-bottom: .0001pt">
<input name="contribuir" type="radio" style="border:0px " value="sim" onclick="mostrar(1)"> Sim
<input name="contribuir" type="radio" value="não" style="border:0px" onclick="mostrar(2)"> Não
<label id="sim_contribuinte" for="simcontribuinte" style="display: none">
1.<span style="font:7.0pt "Times New Roman"">    </span>
Considerando-se apenas as aulas teóricas, qual o número aproximado de estudantes
por turma?</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Até 30" />Até 30.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 31 e 50" />Entre 31 e 50.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 51 e 70" />Entre 51 e 70.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Entre 71 e 100" />Entre 71 e 100.</p>
<p class="MsoNormal" style="text-align: justify; line-height: normal; text-autospace: none; margin-bottom: .0001pt">
<input type="radio" name="aulasteorica" value="Mais de 100" />Mais de 100.
</label>

<label id="nao_contribuinte" for="naocontribuinte" style="display: none"></label>
<BODY>
<?

?></BODY>

 

alguem disposto a me ajudar

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.