Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!