Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
Same form but with another names and functions

my english is not so good but I'll try my best to explain my problem.

So i want to use this model

  <h1 id="modal-title" class="unlock-page__title" style="text-align: center;">Tittle</h1>
            <div id="modal-description" style="color: rgb(174, 174, 174); text-align: center; white-space: pre-line; margin-top: 5px;">middle text</div>

<div style="margin: 80px 0 8px;">
<input id="modal-input" type="text" placeholder="name">
</div>

<div id="modal-submit" onclick="sendMessage()" class="bg-blue white btn">next</div>

And after i add a text on input and press next, everything needs to remain the same and not redirect to a new page, but update the text in the form to ask for a new prompt.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

First, you have to define the Function 'sendMessage'. Then inside the function you have to fetch the input value and store it in a variable, then you can change the value of the title and the description.

    <h1 id="modal-title" class="unlock-page__title" style="text-align: center;">Tittle</h1>
                <div id="modal-description" style="color: rgb(174, 174, 174); text-align: center; white-space: pre-line; margin-top: 5px;">middle text</div>
    
    <div style="margin: 80px 0 8px;">
    <input id="modal-input" type="text" placeholder="name">
    </div>
    
    <div id="modal-submit" onclick="sendMessage()" class="bg-blue white btn">next</div>
    
    
    <script>
    let title = document.getelementbyid('modal-title').value;
    
    function sendMessage(){
        let inputText = document.getelementbyid('modal-description').value;
        document.getElementById('modal-title').value = inputText;
    }
    </script>
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda