Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
can i add 2 tables in one interface using html and firebase?

I want create two table in one interface. How to do it? please explain how to do it? Thank you

My html code here:

enter code here


   
<div class="contrainer mt-3 ml-5 mr-5">
    <table class="table table-dark text-white">
        <thead>
            <th>Sno</th>
            <th>Workout Name</th>
            <th>Description</th>
            <th>Photo</th>
          <th>Duration</th>
        </thead>
        <tbody id="tbody1"></tbody>
    </table>
</div>

Firebase get data code:

enter code here
    
<script>


            function SelectAllData(){
                firebase.database().ref('Day2').once('value',
                function(AllRecords){
                    AllRecords.forEach(
                        function(CurrentRecord){
                        var name = CurrentRecord.val().Name;
                        var desc = CurrentRecord.val().Desc;
                        var photo = CurrentRecord.val().Link;
                        var duration = CurrentRecord.val().Duration;
                        AddItemsToTable(name,desc,photo,duration);
                        }
                    );
                }  
                );             
            }
            window.onload =SelectAllData;
    
              // -----------------------------Filling the table---------------------------------------------
        
        var sNo =0;
    
        
    function AddItemsToTable(name,desc,photo,duration){
    
    var tbody = document.getElementById('tbody1');
    var trow =document.createElement('tr');
    var td0 =document.createElement('td');
    var td1 =document.createElement('td');
    var td2 =document.createElement('td');
    var td3 =document.createElement('td');
    var td4 =document.createElement('td');
    // planList.push([days,breakfast,lunch,dinner]);
    
    
            td0.innerHTML=++sNo;
            td1.innerHTML= photo;
            td2.innerHTML= name;
            td3.innerHTML= desc;
            td4.innerHTML= duration;
    
    
            trow.appendChild(td0);
            trow.appendChild(td1);
            trow.appendChild(td2);
            trow.appendChild(td3);
            trow.appendChild(td4);
    
            tbody.appendChild(trow);
    }
    
        </script>
    

two tables in one interface. firebase Realtime database

I want create two table in one interface. How to do it? please explain how to do it? Thank you

My codes are at the top

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda