I am working on a website where users click on links to other websites. I am working with jquery I want to make a call to database ONLY when the page fully loads !. So this is where my code open a link
$(".link").click(function(){
let link = $(this).attr("data-link");
window.open(link,'_blank','width=300,height=300');
})
I tryed this :
window.open(link,'_blank','width=300,height=300').then(()=>{ ACTION });
//and this
window.open(link,'_blank','width=300,height=300').onload = function(){ action };
But both ways didn't work