cristpate Posted May 12, 2009 at 09:54 AM Report #263284 Posted May 12, 2009 at 09:54 AM alo a todos eu tenho este codigo mas ele nao ta funcionado como eu quero e o seguinte: nesse dropdwon quando for selecionado o elemento 19 ele nao deve por em disable mas do contrario sim, mas quando seleciono o elemento 19 depois de ter selecionado um elemento qualquer ele nao em enable como deveria ser... <select name=Servico size="1" height="1" style="WIDTH: 400px" onchange="if(this.selectedIndex == 19){ document.getElementById('Destinatario').enabled = 'enabled'} else{document.getElementById('Destinatario').disabled = 'disabled'}"><OPTION selected></OPTION> <?php require("conect.php"); $sql="select servico from SERVICOS"; $result=mysql_query($sql); while($registo=mysql_fetch_array($result)){ $Tipo=$registo['servico']; echo '<OPTION>'.$Tipo.'</OPTION>'; } ?> </select> craziness it's to do the same thing over and over again expecting a different result
djthyrax Posted May 24, 2009 at 05:00 PM Report #266929 Posted May 24, 2009 at 05:00 PM if(this.selectedIndex == 19) document.getElementById('Destinatario').disabled = false; else document.getElementById('Destinatario').disabled = true; Deve funcionar. Não peças ajuda por PM! A tua dúvida vai ter menos atenção do que se for postada na secção correcta do fórum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now