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

261
Views
how to redirect to a page in Javascript or Jquery with CSS

I tryied multiple piece of code to redirect to another HTML page in my .js file :

windows.location.href("../index.html")

(for example)

The page load but not the CSS wont load. Can someone help me ?

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

0

You can use this if you want the redirect to happen in a new tab. and this to open in the same tab window.open("https://stackoverflow.com/users/13082963/purke-gopinand?tab=profile", "_self");

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
  window.open("https://stackoverflow.com/users/13082963/purke-gopinand?tab=profile");
}
about 4 years ago · Juan Pablo Isaza Report

0

function redirect_Page () {
        var tID = setTimeout(function () {
            window.location.href = "https://www.google.de/";
            window.clearTimeout(tID);
        }, 5000);
    }

or

    setTimeout(function () {
    window.open('https://www.google.de/', '_blank');
}, 5000);
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!