0

I'm attempting to code my own website, and I thought that the best way to make it seem pro tech is to have it filled with iframes, the only problem comes when I have to load a popup. The popup displays either on my iframe or not at all, and what ever code I seem to be using doesn't work.

I've tried

if(window.location !== window.parent.location){
don't show popup
}
else{
show the popup
} 

I'm just trying to make sure that users can still read my site with an iframe, without taking away the whole popup alerts.

Broccoli Soup
  • 47
  • 1
  • 5
  • This should help(?) https://stackoverflow.com/questions/925039/detect-iframe-embedding-in-javascript#925091 – Jan Sep 02 '19 at 06:38
  • "I thought that the best way to make it seem pro tech is to have it filled with iframes" — It really isn't. Iframes are highly 1990s. – Quentin Sep 02 '19 at 14:00

1 Answers1

-1

I know I'm responding to my own question, but heres the answer I found;

[https://www.w3schools.com/tags/att_iframe_sandbox.asp](Iframe sandbox), if you select all the other restrictions other than popups, you can block popups.

Broccoli Soup
  • 47
  • 1
  • 5