Kay lives here

working with the web

Best JavaScript Popups Ever

I dislike JavaScript. Well, that’s the polite version, anyway. There’s no space to go into why and I’m sure no one’s interested anyway. But the trend for JavaScript which is completely separated from the html markup – what do you call that exactly, is DOM scripting an accurate term? – is starting to win me over.

Anyway, this is a JavaScript pop up window script which does not touch the markup – it cycles through all the links on a page, looking for those with the target attribute, and adding the popup functionality to them automatically. You want the behaviour, include the link to the script file in the document head. No JavaScript, no problem… you get the targeted window. You don’t want it anymore, remove the script link. It’s that simple. Probably not as flexible as some people would like, but a nice solution anyway for all those situations where popup windows are unavoidable. Simple, accessible, nice.

Oh, so you want the link too? Create Pop-ups Without Dead Links.

Comments are closed.