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

192
Views
How to open a link in a new tab without seeing the URL in new tab?

I've been trying many things to make this work but nothing has yet. How can I open a website in a new tab and have it not show the URL being used? I got this idea from this website. The new tabs URL shows up as about:blank. However, I've not been able to get it to work. I'm new to Javascript so go easy on me! Thanks!!!

This is what I've tried:

function NewTab() {
  window.open(
    "https://www.mywebsite.com", "_blank");
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

After digging through the website I was able to find the JS that opens a new tab "without" exposing the URL to the user:

var urlObj = new window.URL(window.location.href);
var url = "https://tam-shellshock.franklinformulas.com"

if (url) {
  var win;
  document.querySelector('a').onclick = function() {
    if (win) {
      win.focus();
    } else {
      win = window.open();
      win.document.body.style.margin = '0';
      win.document.body.style.height = '100vh';
      var iframe = win.document.createElement('iframe');
      iframe.style.border = 'none';
      iframe.style.width = '100%';
      iframe.style.height = '100%';
      iframe.style.margin = '0';
      iframe.src = url;
      win.document.body.appendChild(iframe);
    }
  };
}
<a>Press here</a>

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!