The IE createPopup() Pop-up Method

Test this pop-up method: Using the IE createPopup Pop-up Method


Windows IE: OKópops up fine.
Windows Firefox: IE-only proprietary method createPopup() can't work in this browser.
Windows Safari: IE-only proprietary method createPopup() can't work in this browser.
Windows Opera: IE-only proprietary method createPopup() can't work in this browser.
Mac IE: Gets an error even though it's an IE-only proprietary method that should work.
Mac Firefox: IE-only proprietary method createPopup() can't work in this browser.
Mac Safari: IE-only proprietary method createPopup() can't work in this browser.

BACK TO LIST OF POP-UP METHODS
BACK TO HOME PAGE


Every time a browser is updated, it fixes a few bugs and adds a few features, and the same can be said for operating systems. XP Service Pack 1 allowed vulnerabilities in the proprietary IE createPopup pop-up method but XP SP2 fixed these holes by limiting the number, size, and placement of these pop-ups.

Anyway, apparently Microsoft was hoping that, like the wonderfully useful innerHTML property, browsers would see this Microsoft invention and find it to be very useful and well worth supporting. But no one did. Even Mac IE gets nothing but errors trying to use this property. And if IE cannot even support an IE property, what does that say about what others should do?

The createPopup pop-up method has anomalies, bugs, and security holes. Worse, it was not needed: there are plenty of ways to create pop-ups. Why have a property for this? Probably what happened is that they ran the createPopup pop-up method up a flag pole to see if anyone would salute, and when no one did, they ceased thinking about it. Until the hackers started exploiting security hole, that is. The XP SP2 quickie fix was about lots of issuesówas this one of the main ones? If others had climbed aboard the createPopup pop-up method bandwagon, Microsoft would have no doubt put more effort into debugging it and promoting it and even enhancing it. But there was a 100% snub so that was that.

Really now, of what real use is a CSS property that will only activate on Windows IE? Exactly how many webmasters out there are coding just for IE Windows and nothing else? Can you imagine having to browser sniff and then coding pop-ups one way for IE browsers and another way for everyone else. It's lost on no one that it's simpler to use the methods that will work on all browsers, ignoring the createPopup pop-up method.

And that is exactly what everyone is doing!

Keeping in mind the createPopup() method is IE Windows only, you may use this technique to present pop-up ads, or to solicit subscribers to your ezine, newsletter, or RSS feed. Use if for reminders, warnings, or statistics displaying. You may get survey participants, ask for donations, or use it for political fund raising. You can even inform visitors about some of your other related websites. There is no end to the types of purposes that pop-ups can be used for.

If your pop-up is about thumbnail enlargement, check out What is the easiest way to do thumbnail image enlargement windows? If you want thumbnail enlargement without clicking, check out Making an Image Enlarge When The Mouse Cursor Is Hovering Over It.




THE CODE



<html>
<head><title>The IE createPopup() Pop-up Method</title>

<script type="text/javascript">

function display_popup(){
var w=window.createPopup()
var p=w.document.body
p.style.backgroundColor="yellow"
p.style.border="1px solid blue"
p.innerHTML="Click anywhere outside<br>the pop-up to close it."
w.show(200,200,160,40,document.body)}

function hide_popup(){
var w=window.createPopup()
var p=w.document.body
p.style.backgroundColor="yellow"
p.style.border="1px solid blue"
p.innerHTML="Click anywhere outside<br>the pop-up to close it."
w.hide(200,200,160,40,document.body)}

</script>
</head>
<body><!--FF fails to do it since it's an IE only method--><br><br>

<button onclick="display_popup()">Display pop-up!</button><br><br>

<button onclick="hide_popup()">Hide pop-up!</button>

</body>
</html>