Skip to content

ara pehlivanian

Web Standards, Web Culture, Web Everything.™

Archive for the 'JavaScript' Category

Hooks: How to Keep CSS and JavaScript Separate

Reinforcing the three layers of separation through the use of hooks.

Safer JavaScript through Encapsulation

Not everyone writes 100% of their JavaScript. With sites like The JavaScript Source and JavaScript Kit it’s easy to just copy and paste a bit of free code to quickly get some desired functionality on your site. The trouble is, because there are about as many authors as there are scripts in those libraries, you [...]

document.write() fix for (real) XHTML [v0.5.1]

A script that gets AdSense, the Technorati Badge and other 3rd party JavaScript working with application/xhtml+xml.

Hacking the Technorati Badge part Deux

The code below is out of date. For the latest version see document.write() fix for (real) XHTML
In my previous post on Hacking the Technorati Badge I told the tale of how I managed to get it working with the application/xhtml+xml MIME type. Since then I tweaked the technique and managed to get rid of the [...]

Hacking the Technorati Badge or: How I Hacked Document.Write() in Order to Make it Work With application/xhtml+xml

Technorati, like Google’s AdSense uses JavaScript to insert content into your site via the document.write() method. Unfortunately document.write() isn’t supported in the XML DOM (which is what this site uses when viewed in Firefox when served with the application/xhtml+xml MIME Type). Well, I hacked the document.write() method to circumvent the problem.

Skip to navigation

More stuff by Ara elsewhere on the web

    Snook Approved!

    © 2005-2008, Ara Pehlivanian.

    Stock photography courtesy stock.xchng. This site uses Akismet to catch spam (56,305 caught since May 2006) is hosted by DreamHost and powered by WordPress.