[ Index ]

PHP Cross Reference of Nucleus CMS 3.32

title

Body

[close]

/nucleus/javascript/ -> compatibility.js (source)

   1  /**
   2    * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) 
   3    * Copyright (C) 2002-2007 The Nucleus Group
   4    *
   5    * This program is free software; you can redistribute it and/or
   6    * modify it under the terms of the GNU General Public License
   7    * as published by the Free Software Foundation; either version 2
   8    * of the License, or (at your option) any later version.
   9    * (see nucleus/documentation/index.html#license for more info)
  10    *
  11    *    Javascript code to make sure that:
  12    *  - javascript still works when sending pages as application/xhtml+xml
  13    *  - this doesn't break functionality in IE
  14    *
  15    * How to use:
  16    *        - Include this file
  17    *        - Use createElement() instead of document.createElement()
  18    *
  19    * That's basically it :)
  20    *
  21    * $Id: compatibility.js 1116 2007-02-03 08:24:29Z kimitake $
  22    */
  23  
  24  // to get the script working when page is sent as application/xhtml+xml
  25  function createElement(element) {
  26    if (document.createElementNS) {
  27      return document.createElementNS('http://www.w3.org/1999/xhtml', element);
  28    }
  29    if (document.createElement) {
  30      return document.createElement(element);
  31    }
  32    return false;
  33  }


Generated: Tue Feb 12 15:34:36 2008 Cross-referenced by PHPXref 0.7