tag (which doesn't allow fallback content). Furthermore, the Eolas v. Microsoft case forces the user to click on each embedded item to use it. This PHP function generates conditional comments and JavaScript to work around this. You include this file in your HEAD section and use it like so: Error, browser must support "SVG"

'); This PHP function call produces the following HTML code for your web page written out using document.write():

Error, browser must support "SVG"

IMPORTANT NOTE: Your fallback content must not include any single quotes, only double-quotes should be used. Tested Configurations ===================== + tested and works in IE6 + ASV (3 and 6) + tested and works in Firefox 1.5 (native SVG) + tested and works in Opera 9 TP1 History ======= Version Date Notes ---------------------------------------------------------------------------- 1.0 2006-01-13 Initial version. 1.1 2007-04-17 Changed IE conditional comments such that they are valid in XHTML 1.2 2007-04-17 Changed from PHP to JavaScript implementation to work around Eolas patent issue Thanks To ========= - Rob Russell for expanding upon this idea (via his WordPress plugin) and providing the cool name "inlay" Disclaimer and License ====================== This script is free to use and/or modify, but please provide credit and (where applicable) a link to http://www.codedread.com/ would be nice. Contact ======= Email comments/suggestions/bugs to jeff at codedread dot com. */ // This is the PHP Function function inlaySVG($id, $svgFilename, $width, $height, $fallbackContentAsXmlString) { // prints out the final result to the document printf("\n"); printf("\n"); printf(" \n", $id, $svgFilename, $width, $height); printf(" %s\n", $fallbackContentAsXmlString); printf(" \n"); printf("\n"); } ?>