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

88
Visualizações
How to call script data inside html and php tag?

I am using codeigniter-3 to develop web application i have one form which contains two dropdowns it's dependent each other.for example if i select any one in the first dropdown according to that the second dropdown data has to be rendered for that i wrote onchange function it's taking the value ,what i want is the myFunction() returning some data i want to print that data inside the html and php tag can you please help me to acheive this thing..?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is example of how you can insert result from js function back to html

function myFunction() {
        const e = document.getElementById("jobSel");
         job = e.options[e.selectedIndex].value;

          const node = document.createElement("p");
          node.innerText = job;
         document.getElementById("test").appendChild(node);
    };
<div class="form-group">
    <label for="exampleInputName1">Fuel Type</label>
    <select name="f_type" id="jobSel" class="form-control" onchange="myFunction()">
    <option value="">No Selected</option>
    <option value="1">Petrol</option>
    <option value="2">Diesel</option>
    <option value="3">Kerosine</option>
    <option value="4">Others</option>
    </select>
</div>
<div id="test"></div>

about 4 years ago · Juan Pablo Isaza Relatório
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