Kay lives here

working with the web

universal-accessperformancewarning_256

Best JavaScript Popups Ever

970518_84877162

I dis­like JavaScript. Well, that’s the polite ver­sion, any­way. There’s no space to go into why and I’m sure no one’s inter­ested any­way. But the trend for JavaScript which is com­pletely sep­a­rated from the html markup — what do you call that exactly, is DOM script­ing an accu­rate term? — is start­ing to win me over.

Any­way, this is a JavaScript pop up win­dow script which does not touch the markup — it cycles through all the links on a page, look­ing for those with the tar­get attribute, and adding the popup func­tion­al­ity to them auto­mat­i­cally. You want the behav­iour, include the link to the script file in the doc­u­ment head. No JavaScript, no prob­lem… you get the tar­geted win­dow. You don’t want it any­more, remove the script link. It’s that sim­ple. Prob­a­bly not as flex­i­ble as some peo­ple would like, but a nice solu­tion any­way for all those sit­u­a­tions where popup win­dows are unavoid­able. Sim­ple, acces­si­ble, nice.

Oh, so you want the link too? Cre­ate Pop-ups With­out Dead Links.

Comments are closed.