View Full Version : Getting popups to pop back once they're in the background

06-09-2006, 08:52 PM
I'm a Mac-ophile, so I didn't know I had this problem until I posted my site, and tested it on my boyfriend's PC.

The site is laddesign.biz Yeah, .biz. I hate it, but the .com one was taken.

I have popups that are a crucial part of my site. I know, I know...popups are EVIL. But not these popups. They are a part of my portfolio, enlargements of images that can be activated only at the press of a button. The portfolio itself is in Flash. The js activating the popups and the size of the popups is too. The js for activating where the popups appear on the screen, and the stuff that goes, or, in this case, doesn't go in the header bar, is located in the html page where the portfolio is located.

On a PC, if the user hits the button and the popup appears, and then he clicks on the screen behind it, the popup of course goes to the back. But, unlike a Mac, when he clicks the button to activate a new popup, the popup screen does not come forward again. It remains in the back, active, but not coming forward. It automatically docks itself at the bottom, like a good PC document (I wish Macs would do that), but it won't come forward until you select it from the dock.

What js do I need to either A) make the popup window jump forward when you click the button again, or B) disable the page behind it until you close the popup window? Or C) is there something wrong with my boyfriend's computer? :?

06-10-2006, 05:52 PM
If you know javascript, this will work for the popup
onblur -> close

06-10-2006, 07:54 PM
Sorry, but I don't know js that well. Where do I put the code?

06-10-2006, 10:34 PM
I didn't give you any code, just the approach.
I gogled quickly for those terms and found:<body onblur="self.close()">

06-10-2006, 10:48 PM
Thanks! It works!

I was also Googling around, and found this, which also works:

<body onblur="window.close()">

Thanks to you, once I knew what the "onblur" event handler was for, I found a bunch of helpful stuff on the Web and in my books.


PS. If you need any Photoshop advice, especially relating to the 4-color print side of things, I've been working in it since version 1.0. Illustrator too.

06-10-2006, 11:26 PM
Excellent :)
You're help would be appreciated in the Graphic Design threads I'm sure http://www.dreamweaverclub.com/forum/index.php?c=7 8)