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

129
Vistas
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 Respuestas
Responde la pregunta

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 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