Fill Select in Html from the Firebase database

0

I want to know if there is an adequate form of code to fill a select in html from the Firebase database, that is, get the values I have registered in firebase and display them in the html select ...

This is the select that I want to fill:

<select id="tipoatencion" onchange="ShowSelected();" class="seleccion" name="tipoatencion">
    <option value="Seleccion">Selecciona un tipo de atención</option>
    <option value="pu">Público</option>
    <option value="ca">Caja</option>
    <option value="otros">Otros servicios</option>
</select>

I hope you can help me, thank you very much everyone!

    
asked by Matías Nicolás Núñez Rivas 15.06.2018 в 21:25
source

1 answer

0

Yes. You can do it but not directly.

You have to make a WEB service (over HTTP) that returns those values extracted from the Firebase table, so that you can use it within JavaScript (or render them directly in your HTML).

    
answered by 15.06.2018 в 21:29