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

376
Visualizações
How can I load an URL from a form-button instead of making and clicking a text-link?

I have

jQuery( "#art-calendar-"+infoModalType+"-event-link-url" ).html('<a target="_blank" href="'+calendarEvent.eventLinkUrl+'">'+calendarEvent.eventLinkUrl+'</a>');

in my .js file

and

<button type="button" id="button-1"  type="submit">  
                    Button that loads new page
                    </button>  

in .php file

How can I make a button with custom text, that, onclick, loads a new page instead of showing the url?

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

0

This line had to go into the javascript file:

jQuery('#Termin').attr('action', calendarEvent.eventLinkUrl);

and the next three lines into the PHP file:

<form id="Termin" action="" method="post">
      <button type="submit">jetzt Termin buchen</button>
</form>

The jQuery command adds the calendarEvent + EventURL into the empty action-attribute of the form button called #Termin. This way, the form gets a dynamically produced URL that is being loaded, when clicking the button with the ID Termin.

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