OSDN Git Service

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