Please subscribe to my feed.
When you think of pop-up windows, you may laugh at me because making a link open a new window is one of the easiest things you can do with HTML. In the old days, we simply put a “target=xxxx” tag to create a pop-up window. This can be done in almost an instant, but undeniably it’s ugly.
You can of course use the Javascript:
<a href=”javascript:window.open(url);”>Your link here</a>
But this is ugly and dirty, both in terms of the accessibility and pop-ed up window itself. Look at the code snippet above, the a href tag is not linking to a link but instead it is running some javascript. This means the whole meaning of the link is gone!
Okay, you got the point. So, how do we make it accessible and good, with clean code?
Very easy, we use GreyBox. Basically, GreyBox makes our life easier by supplying the codes needed to build beautiful and clean pop-up windows. GreyBox uses the “rel” attribute. rel is used to describe the relationship between the current page and the href destination of the anchor. The whole line becomes something like this:
<a href=”http://google.com/” title=”Google” rel=”gb_page_fs[]“>Launch google.com in fullscreen window</a>

It’s very easy to setup and use GreyBox even if you are a first time user… just follow the instructions on their website. It’s FREE to download and use!
Why GreyBox?

Now, GreyBox really creates pop-up windows that don’t suck!
Sixthbane
October 29th, 2008 at 5:55 pm
Hey, some people might not be able to access javascript cos it might load too slow for them so another way is to use html to pop up a window from a text link/image link
eg. For text links:
My blogs
eg. For image links:
Just a suggestion hehe but the javascript pop up window does seem pretty good
Sixthbane
October 29th, 2008 at 5:56 pm
Hey, some people might not be able to access javascript cos it might load too slow for them so another way is to use html to pop up a window from a text link/image link
Replace the [ ] with
eg. For text links:
[a href="URL ADDRESS HERE"]My blogs[/a]
eg. For image links:
[a href="URL ADDRESS HERE"][img src="IMAGE ADDRESS URL HERE"][/a]
Just a suggestion hehe but the javascript pop up window does seem pretty good
|1f34|-|1r3
October 29th, 2008 at 10:34 pm
this is cool man….i’m always looking for a nice pop up like this..will integrate this to my blog…thanks !
Kitkat
October 30th, 2008 at 6:41 pm
Sixthbane,
Thanks for the tips, but these days I guess very few people actually disabled their Javascript.
|1f34|-|1r3,
Glad you like it. The other cool pop-up is called Lightbox.
Da brush
October 31st, 2008 at 6:27 am
Pop-ups are outdated, there are the tabs in your browser now
Michael
November 1st, 2008 at 10:05 pm
Sweet Lightbox. I am currently using Dojo at my job and they have a similar lightbox, but this one is far easier to use than dojo’s. Thanks for the great link.
masini second-hand
July 23rd, 2009 at 8:21 am
Checked the code it is actually a div not another window, interesting idea, it definitely looks cool
pays to live green
April 16th, 2010 at 8:47 pm
I would much rather just use jQuery’s lightbox instead of a standard javascript one. Much more efficient and they also have a set of custom themes to match any website.