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

143
Vistas
path broke when uploaded to server (link from js to html)

I programmed a webside and a bunch of it broke when I uploaded it onto the server (until now I only ever programmed locally and not very often at that) I fixed nearly everything but the links between pages.

What works is the "a" element in html to link but most of my pages are linking to oneanother in their js code.

I put all files on the same directory, after trying some path variants (I tried the URL too), so there would be no path and it still didn't work. I have to assume that "window.location.pathname = "result.html" is not the right way.

In Vsc, with the live server, it works, but not on the real one

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

After reading documentation it says:

The pathname property of the Location [...] containing the path of the URL for the location, which will be the empty string if there is no path.

So it just gives you path, and it not intended for redirection. What you are looking for is certainly window.location.replace which documentation can be found here

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