I have a list with multiple selects and I need to change the select option to be updated in the database. I can do this through ajax + php. My question actually is how to trigger the event from the option change. Could someone give me a light? There are several selects and they should trigger the event only from the selected select.
.linha {
display: block;
width: 900px;
}
.selects {
float: left;
display: block;
}
<div class="linha">
<div class="selects">
<label>JAN</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>FEV</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>MAR</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>ABR</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>MAI</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>JUN</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
</div>
<BR>
<BR>
<div class="linha">
<div class="selects">
<label>JAN</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>FEV</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>MAR</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>ABR</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>MAI</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
<div class="selects">
<label>JUN</label>
<select>
<option value="N">Não</option>
<option value="OK">OK</option>
<option value="">-</option>
</select>
</div>
</div>