0
function openPopup() { 
  var popup = window.open("", "popup", "width=600,height=400"); 
  popup.document.write("<iframe href="index.html"></iframe>");
}

the code runs without the quotes but with them it doesn't open the popup.

I'm trying to make the code confusing but functional at the same time, I'm messing with another friend who's learning to code with me and I can't figure it out.

The iframe needs to open my main file/page, while the javascript needs to make a popup that separates from the browser. In my case it is a Chrome - about:blank as the page doesn't have a defined title or link but just needs to run an execute the one sting of code.

epascarello
  • 204,599
  • 20
  • 195
  • 236

0 Answers0