3
How could I do to reset a value of a select based on the option of another select, for example I have these two check boxes, when the "View" option is checked I would like to reset the value of plots in the other select, is it possible to do this? I wanted to do this because I am passing the value to PHP and playing in an HTML template to generate a PDF, but it is always marked the value "2x" in the second select.
<select name="f_taskop">
<option value="À vista">À vista</option>
<option value="Parcelado">Parcelado</option>
</select>
<select id="n-parcelas" name="f_parce">
<option value="2">2x</option>
<option value="3">3x</option>
<option value="4">4x</option>
</select>
What do you mean
zerar o valor de parcelas
? you want to remove the options or change the values of the available options?– Sergio
I wanted to change the value to 0 when you selected "the view" in the first select.
– HBretone
Possible duplicate of How to change content of a select from another select
– Marconi
@Henriquebretone but there is no option with the value
0
.– Sergio
Then in the second select you need to have an option with the value 0?
– HBretone