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

224
Views
How to redirect to an html page with parameters?

I have two HTML pages running on a localhost server and would like for the first page to redirect to the other one but with parameters so that I can use queries on the second page. This is my code in javascript:

var number = 5;
window.location.href = "page2.html/?numberID=number";

So that the new page will have the URL: localhost/page2.html/?numerID=5, but code just gives me a 404 page not found error, how do I fix this?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You need to remove the slash between the page name and the question mark, otherwise the web server will think you are requesting a folder named /page2.html/, hence you are getting 404 - not found

localhost/page2.html?numberID=5
about 4 years ago · Juan Pablo Isaza Report

0

var number = 5;
window.location.href = "page2.html?number="+number;
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!