0
I am with a challenge that for some can be simple thing.
On one page I have a combo box / menu select and a table with 3 columns.
My goal is this:
Once the user has clicked on any option of combo box / menu select the table below will be populated according to the data related to the chosen option
The options of combo box / menu select are pulled from the database. The information that will appear in the table also originates from the database and relates to the option chosen in the combo box, as stated earlier.
Can someone shed some light, please, on how to populate this table?
A small sample snippet of the code:
<select id="especialidade">
<option>-- Escolha a Especialidade --</option>
<option>Especialidade1</option>
<option>Especialidade2</option>
<option>Especialidade3</option>
</select>
<table id="localatendimento">
<tbody>
<tr>
<th>Local</th> <!--Coluna1-->
<th>Observação</th> <!--Coluna2-->
<th>Agendamento</th> <!--Coluna3-->
</tr>
<!--Linhas que serão preenchidas de acordo com a seleção do combo box-->
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
Big hug!
You want to add values as you select in select or you want to display the result whenever you change the select?
– Franck Costa
Display the result whenever you change select. Ex: X option has been selected, X content appears in the table. Y option has been selected, Y content appears in table.
– Carlos Henrique Barbeta