good try to show a layer when in one of the options of the form option is chosen, connect this code in js:
function mostrarReferencia(){
//Si la opcion con id Conocido_1 (dentro del documento > formulario con name fcontacto > y a la vez dentro del array de Conocido) esta activada
if (document.formulario.tamanio.value != "") {
//muestra (cambiando la propiedad display del estilo) el div con id 'desdeotro'
document.getElementById('resto').style.display='block';
//por el contrario, si no esta seleccionada
} else {
//oculta el div con id 'desdeotro'
document.getElementById('resto').style.display='none';
}
}
but it's not working the fact is that the code I have working with radiobutton but to pass it to a selector has stopped working
The form starts like this:
and the selector that should show is this:
<select class="form-control form-control-lg" name="tamanio" id="tamanio" required>
<option value="">Elige opción</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="75">75</option>
<option value="100">100</option>
<option value="125">125</option>
<option value="150">150</option>
</select>
but it's not working for me and I can not find the problem
the call to the file js I have it above the form of the following form:
<script type="text/javascript" src="js/formulario.js" ></script>
If someone can help me, I would appreciate it very much
a greeting