4

I can use window.open('the link here','name','height=x,width=x') to make a popup window. Is this possible without JavaScript at all, using the href tag or similar?

Something like <a href="popup:http://stackoverflow.com">Stackoverflow Popup</a> where the popup: will cause the popup similarly to the way mailto: sends mail.

ZomoXYZ
  • 1,763
  • 21
  • 44
  • Why can't you use javascript? – Ethan Brouwer Oct 26 '15 at 19:38
  • 1
    @EthanBrouwer 1. Im just curious, and 2. it would make some work a bit easier since I wont have to go back and forth between HTML and JavaScript – ZomoXYZ Oct 26 '15 at 19:39
  • You can use the target attribute. But then you will not have the features the JavaScript pop up has. – Rik Oct 26 '15 at 19:40
  • If you want to do web development, and you want the website to be functional, you're going to have to use javascript and css and html. It's really hard (I would even go so far as to say nearly impossible) to make a good website without all three. – Ethan Brouwer Oct 26 '15 at 19:41
  • @EthanBrouwer I know, but I'm just mainly curious if it is possible at all. – ZomoXYZ Oct 26 '15 at 19:45
  • Can it be something like a modal `div` with an `iFrame` inside it or it has to be 100% new browser window? – Mi-Creativity Oct 26 '15 at 20:16
  • It has to be a 100% new browser window. I'm not sure if this is possible. I'm pretty sure it is impossible but I know I'm not the smartest person with web coding, so I was trying to see if anyone knew of a way. – ZomoXYZ Oct 26 '15 at 20:17
  • @AdamBuchananSmith oh yes. I couldn't find any other related questions so i asked. But i was wrong, there are at least 2 others. Thank you. – ZomoXYZ Oct 26 '15 at 20:29

2 Answers2

2

You can use the target attribute to open in a new window

<a href="popup:http://stackoverflow.com" target="_blank">Stackoverflow Popup</a>

Some documentation is here

Rick S
  • 6,476
  • 5
  • 29
  • 43
  • i tried the target="_blank" but it just opens in a new tab, not a new window. I'm looking for a universal command, not one that does one thing on some browsers, and something else on other browsers. This is the closest command I have found so far to a popup. – ZomoXYZ Oct 26 '15 at 19:48
  • The answer the OP is looking for is not possible... – Adam Buchanan Smith Oct 26 '15 at 20:30
0

The popup could be a modal window?

There´s a way using CSS, as taugh in SevenSignature[1].

Leo Yukku
  • 52
  • 5