|
From: SourceForge.net <no...@so...> - 2009-04-15 18:28:26
|
Bugs item #1627536, was opened at 2007-01-04 05:15 Message generated for change (Comment added) made by anderssk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1627536&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Core Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Dianne Britton (dbritton217) Assigned to: D.J. (phppp) Summary: $ function in xoops.js can conflict in IE Initial Comment: Prototype (http://prototype.conio.net/) is a popular Ajax framework. When it is included in a xoops 2.0.16 website, the "$" function defined in xoops.js can conflict with the "$" function defined in Prototype. The failure occurs using Internet Explorer, both IE6 and IE7, but not using Firefox. Reordering the scripts is not a solution. Renaming the xoops.js "$" function to "xoops$" is a simple and effective solution, and is consistent with the naming convention used for the other functions defined in xoops.js. (Prototype has its own naming conventions, e.g., using "$" as a prefix.) I'm attaching my modifed xoops.js file (modified from the xoops 2.0.16 distriution). ---------------------------------------------------------------------- >Comment By: anderssk (anderssk) Date: 2009-04-15 20:28 Message: That is fixed in 2.3.3 ---------------------------------------------------------------------- Comment By: anderssk (anderssk) Date: 2009-04-15 20:28 Message: Fixed in SVN and waiting for review ---------------------------------------------------------------------- Comment By: nao-pon (hypweb) Date: 2007-11-26 03:03 Message: Logged In: YES user_id=1679552 Originator: NO As for this problem, how about the following amendment bills? if ( typeof window.$ != 'function' ) { var $ = function(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') element = document.getElementById(element); if (arguments.length == 1) return element; elements.push(element); } return elements; }; } ---------------------------------------------------------------------- Comment By: nao-pon (hypweb) Date: 2007-11-26 03:03 Message: Logged In: YES user_id=1679552 Originator: NO As for this problem, how about the following amendment bills? if ( typeof window.$ != 'function' ) { var $ = function(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') element = document.getElementById(element); if (arguments.length == 1) return element; elements.push(element); } return elements; }; } ---------------------------------------------------------------------- Comment By: D.J. (phppp) Date: 2007-08-29 04:00 Message: Logged In: YES user_id=1001493 Originator: NO OK, I'll take care of this one personally. ---------------------------------------------------------------------- Comment By: Dianne Britton (dbritton217) Date: 2007-01-04 07:11 Message: Logged In: YES user_id=739595 Originator: YES My previously attached file had an error in it. The "if ( typeof window.$ != 'function' ) {" and "}" should not be surrounding the definition of the "xoops$" function. I'm deleting the earlier attached file and attaching the corrected xoops.js (xoops version 2.0.16). File Added: xoops.js ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1627536&group_id=41586 |