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

158
Visualizações
Jquery Repeater Execute a function before creating new row

Hi I have a form that implements jquery-repeater. Code was working fine and somehow it has stopped functioning properly. Basically I have 2 different pages 1 for new form 2nd for editing a form. On new form everything works fine but edit fails.

New Form

Edit Form

For the first button my default text is "Firma Seç" after clicking the "+" button I am executing code below:

iter_sales++; //holds the row count
var seller_btn = $('[name^="group-a"][name$="[seller_button]"]')[iter_sales-1]; //get new button object
seller_btn.innerText = "Firma Seç" // change inner text to default

Same code works for the new-form but on edit-form row is not being created and object returns null due to inbound array index.

Error : Uncaught TypeError: Cannot set properties of undefined (setting 'innerText')

I tried couple of things like sleeping the function wait for row to be created but didn't work. And same code was working before.

EDIT:

Button element:

<button id="maliyet_firma_modal_btn" name="group-a[seller_button]"
                                                    style="width: 120px!important;
min-width: 120px;
max-width: 120px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" onClick="get_firma(this)" type="button"
                                                    class="btn btn-primary save-button" data-toggle="modal"
                                                    data-target="#demoModal">Firma Seç
                                            </button>
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