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

201
Views
javascript window.open() method still open in new tab while user hold the ctrl button

I am using the following code to open the question paper in popup window and it's working fine but when user hold the ctrl button and click on the start button it still open in new tab i am using the following code

$(document).ready(function(){
        $('#start').on('click', function(){
     
            window.open ('webURL',"mywindow", "width="+screen.availWidth+",height="+screen.availHeight, "status=1,toolbar=0");
        });
    });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Check the event object's ctrlKey property.

    $(document).ready(function(){
        $('#start').on('click', function(event){
            if(event.ctrlKey)
               window.open ('webURL',"mywindow", "width="+screen.availWidth+",height="+screen.availHeight+ ",status");
        });
    });
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!