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

132
Visualizações
JS window.location issue

I use this code for a redirection form when selecting a different jersey from the select input but while the JSfiddle works at my site there is no redirection from the window.location command.

https://jsfiddle.net/giorgoskey/95k1tc0b/4/

function populateSecondTextBox() {
  var p = document.getElementById('your_name');
  var txt = document.getElementById('txtFirst');
  p.textContent = txt.value;
}

function populateNumberTextBox() {
  var p = document.getElementById('your_number');
  var txt = document.getElementById('txtSecond');
  p.textContent = txt.value;
}

var goBtn = document.getElementById("goBtn");
var shirts = document.getElementById("shirts");

goBtn.onclick = function() {
  window.location = shirts.value;
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Hou have to use history.pusthState()

MDM

history.pushState(state, title [, url])

empty state and title.

window.history.pushState({}, '', url);

in your case


var goBtn = document.getElementById("goBtn");
var shirts = document.getElementById("shirts");

goBtn.onclick = function() {
    window.history.pushState({}, '', shirts.value);
}
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