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

175
Views
How to open item in new page for more details

I want to open item in new page when visitor will click btn with icon search. I want redirect just item1 to new page and show more details about item1. I saw same solutions like: window.location='app2.html; or location.replace('https://...') Is better way to do it ?

   //app1.html  page1
    <div class="container">
     
       // item 1
         <div class="col-md-3 text-center border border-light m-4">
          <img src="..." alt="..."><br>
          <button class="btn btn-primary">
            <i class="bi bi-search" data-id="1"></i>   // here is btn with id
          </button>
         </div>

       // item2, ...

    </div>


  //app2.html page2  // new page 
  
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use window.location.href = "app2.html"; inside an implicit function in js.

 
function test(){
    window.location.href = "http://www.devmedia.com.br";
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="test.js"></script>

</head>
<body>
    <button onclick="test()">Btn</button>
</body>
</html>

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!