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

142
Visualizações
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 Respostas
Responde à pergunta

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